Spreadsheet Integrator - Online Help
Available for:
Spreadsheet Integrator
Questions / Feedback?

ExcelDoc Configuration

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

ExcelDoc Configuration Settings

ActiveSheet:   Gets or sets the active sheet.

Gets or sets the active sheet. The active sheet is displayed when the spreadsheet is opened in an editor like Excel. When calling Save if ActiveSheet refers to a sheet where SheetVisible is False, the component will automatically set ActiveSheet to the first sheet in the workbook where SheetVisible is True. The component ensures that ActiveSheet is not set to a hidden sheet so that the hidden sheet will not be displayed when the document is opened in an editor like Excel.

AutoRecalculate:   Whether cell values are automatically recalculated.

This setting determines whether cell values are automatically recalculated. By default this setting is False and cell values are only recalculated when Recalculate or RecalculateAll is called. When this is set to True the component will automatically recalculate cells as necessary. For instance recalculation will take place if a formula changes or a dependent cell value changes that would affect the value of a cell. Use caution when enabling this option as it may impact performance since recalculation may occur often.

CloseInputStreamAfterLoad:   Determines whether or not the input stream is closed after loading.

Determines whether or not the input stream set by SetInputStream is closed after loading is complete. The default value is true.

CloseOutputStreamAfterSave:   Determines whether or not the output stream is closed after saving.

Determines whether or not the output stream set by SetOutputStream is closed after saving is complete. The default value is true.

FrozenColumns:   The number of frozen columns.

This setting returns the number of frozen columns in the sheet specified by SheetIndex. To modify or freeze rows and columns call Freeze. To unfreeze all rows and columns call Unfreeze.

FrozenRows:   The number of frozen rows.

This setting returns the number of frozen rows in the sheet specified by SheetIndex. To modify or freeze rows and columns call Freeze. To unfreeze all rows and columns call Unfreeze.

MergedRangeCount:   The number of merged ranges in the current sheet.

This settings returns the number of merged ranges in the sheet specified by SheetIndex. The ranges are returned by MergedRange[i];.

MergedRange[i]:   The merged range in A1 notation.

This setting returns the merged range in A1 notation for the given index. Possible values for the index are from 0 to MergedRangeCount - 1. To unmerge cells call UnmergeCells.

RangeRowDelimiter:   The delimiter to use to separate row data in a range.

This setting defines the delimiter used to separate row data in a range in the Function event's "Parameters" parameter. The default value is "," which will make all data in the range inseparable. In most cases this is desired since the function will not need to differentiate between data in different rows. If data must be separated by row set this to a different value such as ";".

Given a sheet with data such as:

AB
11112
21314

When using the default value (","), the range "A1:B2" will be represented as "{11,12,13,14}". When set to ";" character will be used to separate row data. For instance, the range "A1:B2" will be represented as "{11,12;13,14}".

RefDimension:   The range of cells with values.

This setting may be queried to determine the range of cells with values in the current sheet. This provides a way to know which rows and columns may have values. This will return a range such as "A2:K14".

Use1904Dates:   Whether to use the 1904 date system.

This setting determines whether the 1904 or 1900 date system is used. By default the component uses the 1900 date system. If this is set to True the component will use the 1904 date system. In the 1904 date system the earliest supported date is January 1, 1904. This effects the value of CellValue and CellText when the cell value represents a date.

UseR1C1Reference:   Determines if R1C1 notation is used in formulas.

This setting controls whether formulas are written using A1 notation or R1C1 notation. If set to True, R1C1 notation is used in formulas. Existing formulas will be converted to R1C1 notation when this is set to True. After setting this to True, querying CellFormula will return the formula in R1C1 notation even if it was originally set in A1 notation. This is also applicable when calling EvaluateFormula. For instance:

ExcelDoc1.Config("UseR1C1Reference=true");
ExcelDoc1.Cell = "A2";
ExcelDoc1.CellType = ExceldocCellTypes.ctNumber;
ExcelDoc1.CellValue = "2";
ExcelDoc1.Cell = "B2";
ExcelDoc1.CellType = ExceldocCellTypes.ctNumber;
ExcelDoc1.CellValue = "3";
ExcelDoc1.Cell = "A1";
ExcelDoc1.CellFormula = "R2C1+R2C2";
ExcelDoc1.Recalculate();

Console.WriteLine(ExcelDoc1.CellText); //Outputs "5"
Console.WriteLine(ExcelDoc1.EvaluateFormula("R2C1+R2C2")); //Outputs "5"
Note that Cell must always be set using A1 notation regardless of the value of this setting.

Base Configuration Settings

GUIAvailable:   Tells the component whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GuiAvailable to false will ensure that the component does not attempt to process external events.

UseBackgroundThread:   Whether threads created by the component are background threads.

If set to True, when the component creates a thread the thread's IsBackground property will be explicitly set to True. By default this setting is False.

UseManagedSecurityAPI:   Tells the component whether or not to use the system security libraries or a managed implementation.

By default the component will use the system security libraries to perform cryptographic functions. This means calls to unmanaged code will be made. In certain environments this is not desirable. To use a completely managed security implementation set this setting to True. Setting this to True tells the component to use the internal managed implementation instead of using the system's security API.

Note that when this value is set the product's system dll is no longer required as a reference, as all unmanaged code is stored in this file.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 1.0.6240.0