ExportFormulas: Boolean;
ExportFormulas: System.Boolean
The ExportFormulas property determines whether table formulas need to be exported. If the property is set to True, the table is exported with formulas, if it is False, only values are exported.
By default the property is set to set to True.
This example assumes that an object Report of the IPrxReport type exists.
Sub UserProc;
Var
Report: IPrxReport;
Tab: ITabSheet;
Exp: ITabSheetExporter;
Begin
Tab:= (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Exp:= New TabSheetExporter.Create;
Exp.TabSheet:= Tab;
Exp.ExportFormulas:= True;
Exp.ExportToFile("c:\Report1.xls", "XLS");
End Sub UserProc;
After executing the example a sheet of regular report is exported to the XLS file. Table formulas are also exported.
It is supposed that the Report object of the IPrxReport type exists in the example.
...
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Report;
Public Shared Sub Main(Params : StartParams);
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Tab: TabSheet;
Exp: ITabSheetExporter;
Begin
MB:= Params.Metabase;
MObj:= MB.ItemById["OBJ42781"].Edit();
Report:= MObj As IPrxReport;
Tab:= (Report.Sheets.Item[0] As IPrxTable).TabSheet;
Exp:= New TabSheetExporter.Create();
Exp.TabSheet:= Tab;
Exp.ExportFormulas:= True;
Exp.ExportToFile("c:\Report1.xls", "XLS");
End Sub;
After executing the example a regular report sheet is exported to the XLS file. Table formulas are also exported.
See also: