using 5.20.26a
Code: Select all
uses ...
, XLSSheetData5, XLSReadWriteII5, XLSCmdFormat5, Xc12Utils5, Xc12Manager5,
XLSComment5, XLSDrawing5, Xc12DataStyleSheet5
...
i:=1;
while not FDQuery1.Eof do
begin
xls[0].AsInteger[i,0]:=FDQuery1.Fields[0].asInteger;
xls[0].AsString[i,1]:=FDQuery1.Fields[1].AsString;
xls[0].AsString[i,2]:=FDQuery1.Fields[2].AsString;
xls[0].AsString[i,3]:=FDQuery1.Fields[3].AsString;
xls[0].AsString[i,4]:=FDQuery1.Fields[4].AsString;
inc(i);
FDQuery1.Next;
end;
xls[0].FreezePanes(1,1);
xls[0].Cell[0,0].FontStyle:=[xfsBold];
xls[0].AutoWidthCols(0,10);
XLS.Filename := 'c:\users\s2\desktop\1234.xlsx';
XLS.Write;
whats wrong?