IPrxReportExporter.AllowSameSheetNames

Syntax

AllowSameSheetNames: Boolean;

Description

The AllowSameSheetNames property determines whether several regular reports containing sheets with equal names can be exported to XLSX file.

Comments

Available values:

Example

Executing the example requires that the repository contains regular reports with the REPORT_1 and REPORT_2 identifiers. The regular reports should contain a sheet names Sheet 1.

Add links to the Metabase, Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report1, Report2: IPrxReport;
    Exp: IPrxReportExporter;
Begin
    // Get the current repository
    MB := MetabaseClass.Active;
    // Get regular reports
    Report1 := MB.ItemById("REPORT_1").Bind As IPrxReport;
    Report2 := MB.ItemById("REPORT_2").Bind As IPrxReport;
    // Create an object for regular report export
    Exp := New PrxReportExporter.Create;
    // Allow export of regular reports containing sheets with equal names
    Exp.AllowSameSheetNames := True;
    // Export regular reports to XLSX file
    Exp.StartBatchCommand("C:\Report.xlsx""xlsx");
    Exp.Report := Report1;
    Exp.ExportToFile("C:\Report.xlsx""xlsx");
    Exp.Report := Report2;
    Exp.ExportToFile("C:\Report.xlsx""xlsx");
    Exp.FinishBatchCommand;
End Sub UserProc;

After executing the example the regular reports are exported to the C:\Report.xlsx file. The file contains the sheets Sheet 1 and Sheet 1_0.

See also:

IPrxReportExporter