Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intraweb with Flexcel
#3
I have not tried this in the latest version of IW but here is the flexcell routine that works for us.


procedure fxExportToExcel(ADataSet: TDataSet; const AFileName, ABreakFieldName: string;
AOpenFileInExcel: Boolean = True);
var
lXls: TXlsFile;
begin
//this must be called to run Flexcel in a dll
FlexCelDllInit;
lXls := TXlsFile.Create(True);
try
fxPrepareExcelData( ADataSet, lXls, ABreakFieldName );

// Save to File
lXls.Save( AFileName );

{ Open File in Excel }
if AOpenFileInExcel then
ShellExecute(0, 'open', PCHAR(AFileName), nil, nil, SW_SHOWNORMAL);

ADataSet.First;

finally
lXls.Free;
//this must be called to run Flexcel in a dll
FlexCelDllShutdown;
ADataSet.EnableControls;
end;
end;
Reply


Messages In This Thread
Intraweb with Flexcel - by matija - 12-20-2023, 11:54 AM
RE: Intraweb with Flexcel - by Alexandre Machado - 12-21-2023, 06:47 PM
RE: Intraweb with Flexcel - by joelcc - 12-22-2023, 02:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)