Class CalcWorkbook
CalcWorkbook holds a collection of CalcSheet objects.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Calculate
Assembly: Syncfusion.Calculate.Base.dll
Syntax
public class CalcWorkbook : ISerializable
Constructors
CalcWorkbook(CalcSheet[], Hashtable)
Initializes a new instance of the CalcWorkbook class.
Declaration
public CalcWorkbook(CalcSheet[] calcSheets, Hashtable namedRanges)
Parameters
Type | Name | Description |
---|---|---|
CalcSheet[] | calcSheets | The calc sheets. |
System.Collections.Hashtable | namedRanges | Hashtable of key, value pairs for Namedrange values. |
CalcWorkbook(SerializationInfo, StreamingContext)
Initializes a new CalcWorkbook from a serialization stream.
Declaration
protected CalcWorkbook(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | An object that holds all the data needed to serialize or deserialize this instance. |
System.Runtime.Serialization.StreamingContext | context | Describes the source and destination of the serialized stream specified by info. |
Fields
sheetNames
ArrayList of strings holding the CalcSheets names.
Declaration
[Obsolete("This field will be removed in a future version. Please use the CalcSheetList property instead.", false)]
public ArrayList sheetNames
Field Value
Type |
---|
System.Collections.ArrayList |
Properties
CalcSheetList
Gets or sets an Arraylist of CalcSheet objects used in this workbook.
Declaration
public CalcSheetList CalcSheetList { get; set; }
Property Value
Type |
---|
CalcSheetList |
calcSheets
Array of CalcSheets objects used in this workbook.
Declaration
[Obsolete("This property will be removed in a future version. Please use the CalcSheetList property instead.", false)]
public CalcSheet[] calcSheets { get; }
Property Value
Type |
---|
CalcSheet[] |
Engine
Gets/Sets the CalcEngine object.
Declaration
public CalcEngine Engine { get; set; }
Property Value
Type |
---|
CalcEngine |
Remarks
The setter only sets once, and only if InitCalcWorkbook has been called with a zero CalcSheet count.
Item[Int32]
Gets / sets a CalcSheet object with the given index.
Declaration
public CalcSheet this[int sheetIndex] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | sheetIndex | The sheet index. |
Property Value
Type |
---|
CalcSheet |
Item[String]
Gets / sets a CalcSheet object with the given name.
Declaration
public CalcSheet this[string sheetName] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | sheetName | The sheet name. |
Property Value
Type |
---|
CalcSheet |
SheetCount
Number of CalcSheets in this workbook.
Declaration
public int SheetCount { get; }
Property Value
Type |
---|
System.Int32 |
Methods
CalculateAll()
A Virtual method to calculate all formulas in this workbook.
Declaration
public virtual void CalculateAll()
ClearFormulas(CalcSheet)
Removes all formulas in the given CalcSheet.
Declaration
public void ClearFormulas(CalcSheet sheet)
Parameters
Type | Name | Description |
---|---|---|
CalcSheet | sheet | The CalcSheet. |
GetObjectData(SerializationInfo, StreamingContext)
Implements the ISerializable interface and returns the data needed to serialize the workbook.
Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | A SerializationInfo object containing the information required to serialize the cell model. |
System.Runtime.Serialization.StreamingContext | context | A StreamingContext object containing the source and destination of the serialized stream. |
GetSheetID(String)
A method that gets the integer ID of a CalcSheet.
Declaration
public int GetSheetID(string sheetName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sheetName | The CalcSheet name. |
Returns
Type | Description |
---|---|
System.Int32 | The integer ID. |
ReadSSS(String)
Creates a CalcWorkbook from a file written using WriteSSS.
Declaration
public static CalcWorkbook ReadSSS(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | Pathname of the file. |
Returns
Type | Description |
---|---|
CalcWorkbook | A CalcWorkbook object. |
WriteSSS(String)
Writes a tab-delimited file holding the Workbook information.
Declaration
public void WriteSSS(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The pathname of the file to be written. |