Search

'row'에 해당되는 글 1건

  1. 2011.11.13 XLSReadWriteII4 : 몇 가지 설정

XLSReadWriteII4 : 몇 가지 설정

Programming/Delphi 2011.11.13 15:35 Posted by 파란크리스마스
행추가
ws.InsertRows(row+1, 1);

행삭제
ws.DeleteRows(row, row+4);

셀병합
ws.MergeCells(1, p_row, 1, row-1);

테두리     
ws.Range.ItemsRef['A'+inttostr(2)+':'+'A'+inttostr(row)].BorderOutlineStyle := cbsThin; // cbsHair;

가운데 설정
ws.Cell[9, row].HorizAlignment := chaCenter;

몇 가지 설정
ws.Cell[i, row].NumberFormat := '_-* #,##0_-;-* #,##0_-;_-* ""-""_-;_-@_-';
ws.Cell[9, row].NumberFormat := '0%';

셀높이 설정
ws.Rows[(i*28)+2].Height := ws.Rows[2].Height;

셀복사
XLS01.CopyCells(SheetIndex, 0,0,7,27, SheetIndex, 0,(i*28));

출력 설정
XLS01.Sheet[SheetIndex].PrintSettings.Options := [psoHorizCenter];
XLS01.Sheet[SheetIndex].PrintSettings.HorizPagebreaks.Clear;
//
HorizPagebreak := ws.PrintSettings.HorizPagebreaks.Add;
HorizPagebreak.Row := (loopRow*28)+addRow-tmpAddRow-1;

배경색 지정

function RGBToColor(R,G,B:Byte): TColor;
begin
Result:=B Shl 16 Or
G Shl 8 Or
R;
end;

color := RGBToColor(255,255,0)
ws.Range.ItemsRef['A'+IntToStr(row)+':'+GetRowStr(col)+IntToStr(row)].FillPatternForeColor := TColorToClosestXColor(color);
신고


 

티스토리 툴바