Excel Export
Hi,
I need to export my data from my dataset into the excel file. Therefore I use the TfrxXLSExport component. The process is as following:
The File was created with certain size. But if I open the file with Office there is no sheet and no data shown. What's wrong? I also tried to export the data with CSVExport or XLSBiffExport. Also the same.
Thanks in advance.
Greetings, Moony
I need to export my data from my dataset into the excel file. Therefore I use the TfrxXLSExport component. The process is as following:
if myReport.LoadFromFile(Filename.xml) then
begin
  myXLSExport.FileName := Filename.XLS;
  if not myReport.PrepareReport() then
    Exit;
  myReport.Export(myXLSExport);
end;
The File was created with certain size. But if I open the file with Office there is no sheet and no data shown. What's wrong? I also tried to export the data with CSVExport or XLSBiffExport. Also the same.
Thanks in advance.
Greetings, Moony
Comments
Could it be as simple as:
if myReport.LoadFromFile('Filename.xml') then
begin
myXLSExport.FileName := 'Filename.XLS';
if not myReport.PrepareReport() then
Exit;
myReport.Export(myXLSExport);
end;
LoadReport destroys or resets any setup you may have done to a report.
Maybe PrepareReport does the same thing to the export setup? If that is the case then it mean moving 1 line
if not myReport.PrepareReport() then
Exit;
myXLSExport.FileName := 'Filename.XLS';
myReport.Export(myXLSExport);
The file was created and open it with a texteditor there is data inside, but I cannot open this file with office.