IDtExcelConsumerEx.ForceFullCalculation

Syntax

ForceFullCalculation Boolean;

Description

The ForeFullCalculation property determines whether a workbook is force calculated on opening.

Comments

Available values:

Example

Executing the example requires that the repository contains a time series database with the FC identifier. The database contains the COUNTRY factor attribute, that is a link to the dictionary.

Add links to the Metabase, Dt, Cubes, Dal, Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Consumer: DtExcelConsumerEx;
    Exporter: ICubeMetaExporter;
    Binding: ICubeMetaExporterBinding;
Begin
    // Data consumer for export to Excel format
    Consumer := New DtExcelConsumerEx.Create;
    Consumer.File := "C:\result.xlsx";
    Consumer.HasHeader := True;
    Consumer.Sheet := "Sheet1";
    Consumer.ForceFullCalculation := True;
    // Export parameters
    Exporter := New CubeMetaExporterClass.Create;
    MB := MetabaseClass.Active;
    Exporter.Rubricator := MB.ItemById("FC").Bind As IRubricator;
    Exporter.Consumer := Consumer As IDtConsumer;
    // Export parameters for the COUNTRY attribute
    Binding := Exporter.Bindings.Add;
    Binding.FieldName := "CountryKey";
    Binding.DataType := DbDataType.Integer;
    Binding.BindingType := CubeMetaExporterBindingType.Attribute;
    Binding.Attribute := "COUNTRY";
    Binding.KeyField := "KEY";
    // Parameters of values export
    Binding := Exporter.Bindings.Add;
    Binding.FieldName := "Year";
    Binding.DataType := DbDataType.String;
    Binding.BindingType := CubeMetaExporterBindingType.Calendar;
    Binding.DateFormat := "$Year$";
    Binding.ValueFieldName := "Value";
    Binding.ValueDataType := DbDataType.Float;
    Exporter.ByColumns := False;
    Exporter.CalendarLevel := DimCalendarLevel.Year;
    // Export
    Exporter.Export;
End Sub UserProc;

After executing the example, data from time series database FC is loaded to the file C:\result.xlsx on the sheet Sheet1.

See also:

IDtExcelConsumerEx