ForceFullCalculation Boolean;
ForceFullCalculation: boolean;
The ForeFullCalculation property determines whether a workbook is force calculated on opening.
Available values:
True. A workbook is force calculated on opening.
False. A workbook is not force calculated on opening.
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.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Dt;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dal;
Imports Prognoz.Platform.Interop.Dimensions;
…
Public Shared Sub Main(Params: StartParams);
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 := Params.Metabase;
Exporter.Rubricator := MB.ItemById["FC_COMM_26"].Bind() As IRubricator;
Exporter.Consumer := Consumer As IDtConsumer;
// Export parameters for the COUNTRY attribute
Binding := Exporter.Bindings.Add();
Binding.FieldName := "CountryKey";
Binding.DataType := DbDataType.ddtInteger;
Binding.BindingType := CubeMetaExporterBindingType.cmebtAttribute;
Binding.Attribute := "COUNTRY";
Binding.KeyField := "KEY";
// Parameters of values export
Binding := Exporter.Bindings.Add();
Binding.FieldName := "Year";
Binding.DataType := DbDataType.ddtString;
Binding.BindingType := CubeMetaExporterBindingType.cmebtCalendar;
Binding.DateFormat := "$Year$";
Binding.ValueFieldName := "Value";
Binding.ValueDataType := DbDataType.ddtFloat;
Exporter.ByColumns := False;
Exporter.CalendarLevel := DimCalendarLevel.dclYear;
// Export
Exporter.Export();
End Sub;
See also: