Class WorksheetDataHolder
This class stores worksheet data extracted from document and is responsible for parsing and serialization of this data into special FileDataHolder.
Inheritance
Implements
Namespace: Syncfusion.XlsIO.Implementation.XmlSerialization
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
public class WorksheetDataHolder : Object, IDisposable
  Constructors
WorksheetDataHolder(FileDataHolder, ZipArchiveItem)
Initializes new instance of the WorksheetDataHolder class.
Declaration
public WorksheetDataHolder(FileDataHolder holder, ZipArchiveItem item)
  Parameters
| Type | Name | Description | 
|---|---|---|
| FileDataHolder | holder | Objects that stores workbook data.  | 
      
| ZipArchiveItem | item | Archive item with sheet data.  | 
      
WorksheetDataHolder(FileDataHolder, Relation, String)
Initializes a new instance of the WorksheetDataHolder class.
Declaration
public WorksheetDataHolder(FileDataHolder holder, Relation relation, string parentPath)
  Parameters
| Type | Name | Description | 
|---|---|---|
| FileDataHolder | holder | Objects that stores workbook data.  | 
      
| Relation | relation | Relation that points at (relative path) necessary worksheet.  | 
      
| System.String | parentPath | Path to the relation parent object (to convert relative path into absolute).  | 
      
Properties
ArchiveItem
Gets or sets archive item that has all worksheet data.
Declaration
public ZipArchiveItem ArchiveItem { get; set; }
  Property Value
| Type | 
|---|
| ZipArchiveItem | 
CommentNotesId
Gets or sets relation id for comment notes item. Null means no comments present (or were present).
Declaration
public string CommentNotesId { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
ControlsStream
Gets or sets stream with controls data.
Declaration
public Stream ControlsStream { get; set; }
  Property Value
| Type | 
|---|
| System.IO.Stream | 
DrawingsId
Gets or sets relation id for drawings. Null means no drawings present (or were present).
Declaration
public string DrawingsId { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
DrawingsRelations
Gets drawings relation collection. Read-only.
Declaration
public RelationCollection DrawingsRelations { get; }
  Property Value
| Type | 
|---|
| RelationCollection | 
HFDrawingsRelations
Gets header/footer drawings relations collection. Read-only.
Declaration
public RelationCollection HFDrawingsRelations { get; }
  Property Value
| Type | 
|---|
| RelationCollection | 
ParentHolder
Gets parent FileDataHolder. Read-only.
Declaration
public FileDataHolder ParentHolder { get; }
  Property Value
| Type | 
|---|
| FileDataHolder | 
RelationId
Gets or sets Worksheet's relation id in the workbook.
Declaration
public string RelationId { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
Relations
Gets relations collection. Read-only.
Declaration
public RelationCollection Relations { get; }
  Property Value
| Type | 
|---|
| RelationCollection | 
SheetId
Gets or sets sheet id extracted from the file.
Declaration
public string SheetId { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
VmlDrawingsId
Gets or sets relation id for vml drawings. Null means no vml drawings present (or were present).
Declaration
public string VmlDrawingsId { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
VmlHFDrawingsId
Gets or sets relation id for vml drawings. Null means no vml drawings present (or were present).
Declaration
public string VmlHFDrawingsId { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
Methods
Clone(FileDataHolder)
Create copy of the current object.
Declaration
public WorksheetDataHolder Clone(FileDataHolder dataHolder)
  Parameters
| Type | Name | Description | 
|---|---|---|
| FileDataHolder | dataHolder | 
Returns
| Type | Description | 
|---|---|
| WorksheetDataHolder | A copy of the current object.  | 
      
CollectPivotRelations(String)
Collect Pivot Relations
Declaration
public void CollectPivotRelations(string itemName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | itemName | 
Dispose()
Dispose
Declaration
public void Dispose()
  ParseChartsheetData(ChartImpl)
Parses chart worksheet data.
Declaration
public void ParseChartsheetData(ChartImpl chart)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ChartImpl | chart | Represents chart object to be parsed.  | 
      
ParseConditionalFormatting(List<DxfImpl>, WorksheetImpl)
Parses conditional formats.
Declaration
public void ParseConditionalFormatting(List<DxfImpl> dxfStyles, WorksheetImpl sheet)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Collections.Generic.List<DxfImpl> | dxfStyles | Dxf styles collection.  | 
      
| WorksheetImpl | sheet | Worksheet to parse CF into.  | 
      
ParseDrawings(WorksheetBaseImpl, Relation, Dictionary<String, Object>)
This method tries to parse drawings part.
Declaration
public void ParseDrawings(WorksheetBaseImpl sheet, Relation drawingRelation, Dictionary<string, object> dictItemsToRemove)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WorksheetBaseImpl | sheet | Parent worksheet.  | 
      
| Relation | drawingRelation | Relation pointing at drawings xml item..  | 
      
| System.Collections.Generic.Dictionary<System.String, System.Object> | dictItemsToRemove | Dictionary with archive items to remove after parsing.  | 
      
ParseDrawings(WorksheetBaseImpl, String, Dictionary<String, Object>)
This method tries to parse drawings part.
Declaration
public void ParseDrawings(WorksheetBaseImpl sheet, string relationId, Dictionary<string, object> dictItemsToRemove)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WorksheetBaseImpl | sheet | Parent worksheet.  | 
      
| System.String | relationId | Relation id of the shapes relation.  | 
      
| System.Collections.Generic.Dictionary<System.String, System.Object> | dictItemsToRemove | Dictionary with archive items to remove after parsing.  | 
      
ParsePivotTable(IWorksheet)
Parse PivotTable in the worksheet
Declaration
public void ParsePivotTable(IWorksheet sheet)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IWorksheet | sheet | 
ParseVmlShapes(ShapeCollectionBase, String, RelationCollection)
This method tries to parse vml shapes.
Declaration
public RelationCollection ParseVmlShapes(ShapeCollectionBase shapes, string relationId, RelationCollection relations)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ShapeCollectionBase | shapes | |
| System.String | relationId | Relation id of the vml shapes relation.  | 
      
| RelationCollection | relations | 
Returns
| Type | Description | 
|---|---|
| RelationCollection | Collection of the corresponding vml relations.  | 
      
ParseWorksheetData(WorksheetImpl, Dictionary<Int32, Int32>, Boolean)
Parses worksheet data.
Declaration
public void ParseWorksheetData(WorksheetImpl sheet, Dictionary<int, int> dictUpdateSSTIndexes, bool parseOnDemand)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WorksheetImpl | sheet | Worksheet to parse.  | 
      
| System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dictUpdateSSTIndexes | |
| System.Boolean | parseOnDemand | 
SerializeChartsheet(ChartImpl)
Serializes worksheet into internal zip archive item.
Declaration
public void SerializeChartsheet(ChartImpl chart)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ChartImpl | chart | Worksheet to serialize.  | 
      
SerializeDrawings(WorksheetBaseImpl)
Serializes worksheet drawings, except vml drawings.
Declaration
public bool SerializeDrawings(WorksheetBaseImpl sheet)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WorksheetBaseImpl | sheet | Worksheet to serialize drawings for.  | 
      
Returns
| Type | 
|---|
| System.Boolean | 
SerializeDrawings(WorksheetBaseImpl, RelationCollection, ref String, String, String)
Serializes worksheet drawings, except vml drawings.
Declaration
public bool SerializeDrawings(WorksheetBaseImpl sheet, RelationCollection relations, ref string id, string contentType, string relationType)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WorksheetBaseImpl | sheet | Worksheet to serialize drawings for.  | 
      
| RelationCollection | relations | Relations to put drawings relation into.  | 
      
| System.String | id | Drawing id.  | 
      
| System.String | contentType | Content type.  | 
      
| System.String | relationType | Relation type.  | 
      
Returns
| Type | 
|---|
| System.Boolean | 
SerializeHeaderFooterImages(WorksheetBaseImpl, RelationCollection)
This method serializes header/footer images.
Declaration
public void SerializeHeaderFooterImages(WorksheetBaseImpl sheet, RelationCollection relations)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WorksheetBaseImpl | sheet | Worksheet to serialize header/footer images for.  | 
      
| RelationCollection | relations | 
SerializeRelations(RelationCollection, String, WorksheetDataHolder)
Serializes relations.
Declaration
public void SerializeRelations(RelationCollection relations, string strParentItemName, WorksheetDataHolder holder)
  Parameters
| Type | Name | Description | 
|---|---|---|
| RelationCollection | relations | Relation to be serialized.  | 
      
| System.String | strParentItemName | Parent item name.  | 
      
| WorksheetDataHolder | holder | 
SerializeRelations(String)
Serializes relations.
Declaration
public void SerializeRelations(string strParentItemName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | strParentItemName | Represents parent item name.  | 
      
SerializeTables(XmlWriter, WorksheetImpl)
Serializes all tables from the specified worksheet.
Declaration
public void SerializeTables(XmlWriter writer, WorksheetImpl sheet)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Xml.XmlWriter | writer | XmlWriter to serialize worksheet's part of the tables serialization.  | 
      
| WorksheetImpl | sheet | 
SerializeWorksheet(WorksheetImpl, Dictionary<Int32, Int32>, Dictionary<PivotCacheImpl, String>)
Serializes worksheet into internal zip archive item.
Declaration
public void SerializeWorksheet(WorksheetImpl sheet, Dictionary<int, int> hashNewXFIndexes, Dictionary<PivotCacheImpl, string> cacheFiles)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WorksheetImpl | sheet | Worksheet to serialize.  | 
      
| System.Collections.Generic.Dictionary<System.Int32, System.Int32> | hashNewXFIndexes | Dictionary with updated xf indexes.  | 
      
| System.Collections.Generic.Dictionary<PivotCacheImpl, System.String> | cacheFiles | Dictionary that will contain pivot cache files (key - cache object, value - cache file name).  |