En la versión win32 lo hago así y funciona perfecto.
Necesito hacer lo mismo pero en un aplicativo de Intraweb.
Código Delphi
[-]
FDCONNECTion1.close;
fdconnection1.open;
fdquery1.Close;
fdquery1.Open();
if fdquery1.IsEmpty = FALSE then
try
Report := TFlexCelReport.Create(true);
if not SaveDialog1.Execute then exit;
Report.AddTable('fdquery1',fdquery1, TRecordCountMode.SlowCount, TDisposeMode.DoNotDispose);
Report.SetValue('empresa',combobox7.text); Report.SetValue('ejercicio',edit9.Text); Report.SetValue('periodo',combobox8.Text); Report.SetValue('fecha',datetimetostr(now));
Report.Run(ExtractFilePath(application.ExeName)+'\EERR_SAP.xlsx', SaveDialog1.FileName);
if MessageDlg('Se ha exportado correctamente. ¿Desea abrir el archivo generado?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then
begin
ShellExecute(0, 'open', PCHAR(SaveDialog1.FileName), nil, nil, SW_SHOWNORMAL);
end;
finally
FDCONNECTion1.close;
end;