Class Excel2007Parser
Class used for parsing Excel 2007 workbooks.
Inheritance
Namespace: Syncfusion.XlsIO.Implementation.XmlReaders
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
public class Excel2007Parser : Object
Constructors
Excel2007Parser(WorkbookImpl)
Initializes new instance of the parser.
Declaration
public Excel2007Parser(WorkbookImpl book)
Parameters
Type | Name | Description |
---|---|---|
WorkbookImpl | book | Parent workbook. |
Fields
AdditionalProgressItems
Additional progress items
Declaration
public const int AdditionalProgressItems = 4
Field Value
Type |
---|
System.Int32 |
Properties
FormulaUtil
Gets FformulaUtil that corresponds to invariant culture.
Declaration
public FormulaUtil FormulaUtil { get; }
Property Value
Type |
---|
FormulaUtil |
Methods
ConvertColorByTint(Color, Double)
Applies tint to the specified color.
Declaration
public static Color ConvertColorByTint(Color color, double dTint)
Parameters
Type | Name | Description |
---|---|---|
Color | color | Color to apply tint value to. |
System.Double | dTint | Tint value to apply. |
Returns
Type | Description |
---|---|
Color | Color after applying tint value. |
ConvertHLSToRGB(Double, Double, Double)
Converts HLS components to RGB color values and returns Color, according to this values.
Declaration
public static Color ConvertHLSToRGB(double dHue, double dLuminance, double dSaturation)
Parameters
Type | Name | Description |
---|---|---|
System.Double | dHue | Hue value. |
System.Double | dLuminance | Luminance value. |
System.Double | dSaturation | Saturation value. |
Returns
Type |
---|
Color |
ConvertRGBtoHLS(Color, out Double, out Double, out Double)
Converts color to HLS values.
Declaration
public static void ConvertRGBtoHLS(Color color, out double dHue, out double dLuminance, out double dSaturation)
Parameters
Type | Name | Description |
---|---|---|
Color | color | Color to convert. |
System.Double | dHue | Hue value. |
System.Double | dLuminance | Luminance value. |
System.Double | dSaturation | Saturation value. |
CopyFillSettings(FillImpl, ExtendedFormatImpl)
Copies fill settings from fill object into extended format.
Declaration
public static void CopyFillSettings(FillImpl fill, ExtendedFormatImpl extendedFormat)
Parameters
Type | Name | Description |
---|---|---|
FillImpl | fill | Fill to copy from. |
ExtendedFormatImpl | extendedFormat | Extended format to copy into. |
Dispose()
Dispose
Declaration
public void Dispose()
GetFont(XmlReader)
Get Font
Declaration
public FontImpl GetFont(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader |
Returns
Type |
---|
FontImpl |
GetThemeColor(String)
Converts theme color name into rgb color value.
Declaration
public Color GetThemeColor(string colorName)
Parameters
Type | Name | Description |
---|---|---|
System.String | colorName | Color name to get rgb color value for. |
Returns
Type | Description |
---|---|
Color | Rgb color object that corresponds to the theme color. |
GetThemeColor(String, Dictionary<String, Color>)
Converts theme color name into rgb color value.
Declaration
public static Color GetThemeColor(string colorName, Dictionary<string, Color> themeColors)
Parameters
Type | Name | Description |
---|---|---|
System.String | colorName | Color name to get rgb color value for. |
System.Collections.Generic.Dictionary<System.String, Color> | themeColors | Dictionary that holds theme color name and color. |
Returns
Type | Description |
---|---|
Color | Rgb color object that corresponds to the theme color. |
HueToRGB(Double, Double, Double)
Converts Hue value to RGB single component.
Declaration
public static double HueToRGB(double dN1, double dN2, double dHue)
Parameters
Type | Name | Description |
---|---|---|
System.Double | dN1 | Magic number 1. |
System.Double | dN2 | Magic number 2. |
System.Double | dHue | Hue value. |
Returns
Type | Description |
---|---|
System.Double | RGB component value. |
ParseAutoFilters(XmlReader, WorksheetImpl)
Extracts auto filters from reader and inserts it into worksheet.
Declaration
public void ParseAutoFilters(XmlReader reader, WorksheetImpl sheet)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
WorksheetImpl | sheet | Worksheet to put data into. |
ParseAutoShape(AutoShapeImpl, XmlReader)
Parse AutoShape
Declaration
public void ParseAutoShape(AutoShapeImpl autoShape, XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
AutoShapeImpl | autoShape | |
System.Xml.XmlReader | reader |
ParseCFRuleTag(XmlReader, ConditionalFormats, List<DxfImpl>, Boolean)
Parses conditional formatting rule tag.
Declaration
public void ParseCFRuleTag(XmlReader reader, ConditionalFormats conditionalFormats, List<DxfImpl> lstDxfs, bool hasExLst)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract data from. |
ConditionalFormats | conditionalFormats | Condition to extract data into. |
System.Collections.Generic.List<DxfImpl> | lstDxfs | Dxf styles collection. |
System.Boolean | hasExLst |
ParseChartsheet(XmlReader, ChartImpl)
Extracts chart sheet from XmlReader.
Declaration
public void ParseChartsheet(XmlReader reader, ChartImpl chart)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract chart sheet data from. |
ChartImpl | chart | Chart toi fill with data. |
ParseComments(XmlReader, WorksheetImpl)
Parse xml document with comments data (author, text).
Declaration
public void ParseComments(XmlReader reader, WorksheetImpl sheet)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
WorksheetImpl | sheet | Worksheet to put extracted comments data into. |
ParseConditionalFormatting(XmlReader, ConditionalFormats, List<DxfImpl>)
Extracts conditional formats from XmlReader.
Declaration
public bool ParseConditionalFormatting(XmlReader reader, ConditionalFormats conditionalFormats, List<DxfImpl> lstDxfs)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract data from. |
ConditionalFormats | conditionalFormats | Conditional formats. |
System.Collections.Generic.List<DxfImpl> | lstDxfs | Dxf styles collection. |
Returns
Type |
---|
System.Boolean |
ParseConnection(XmlReader)
Parse external connection
Declaration
public void ParseConnection(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader |
ParseConnections(XmlReader)
Parse external connection
Declaration
public void ParseConnections(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader |
ParseContentTypes(XmlReader, IDictionary<String, String>, IDictionary<String, String>)
Declaration
public void ParseContentTypes(XmlReader reader, IDictionary<string, string> contentDefaults, IDictionary<string, string> contentOverrides)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | |
System.Collections.Generic.IDictionary<System.String, System.String> | contentDefaults | |
System.Collections.Generic.IDictionary<System.String, System.String> | contentOverrides |
ParseCustomProperties(XmlReader)
Extracts custom properties from reader and inserts it workbook.
Declaration
public void ParseCustomProperties(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract custom properties from. |
ParseCustomProperty(XmlReader, CustomDocumentProperties)
Extracts custom property from reader and inserts it into custom property implementation.
Declaration
public void ParseCustomProperty(XmlReader reader, CustomDocumentProperties customProperties)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract data from. |
CustomDocumentProperties | customProperties | Custom property. |
ParseDataBaseProperty(XmlReader, DataBaseProperty)
Parse DataBase Property
Declaration
public void ParseDataBaseProperty(XmlReader reader, DataBaseProperty DataBase)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | |
DataBaseProperty | DataBase |
ParseDataValidations(XmlReader, WorksheetImpl)
Extracts data validation from reader and inserts it into worksheet.
Declaration
public void ParseDataValidations(XmlReader reader, WorksheetImpl sheet)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
WorksheetImpl | sheet | Worksheet to put data into. |
ParseDocumentCoreProperties(XmlReader)
Extracts core properties from reader and inserts it workbook.
Declaration
public void ParseDocumentCoreProperties(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract core properties from. |
ParseDrawings(XmlReader, WorksheetBaseImpl, String, List<String>, Dictionary<String, Object>)
This method extracts drawings from specified XmlReader.
Declaration
public void ParseDrawings(XmlReader reader, WorksheetBaseImpl sheet, string drawingsPath, List<string> lstRelationIds, Dictionary<string, object> dictItemsToRemove)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract data from. |
WorksheetBaseImpl | sheet | Worksheet to place extracted shapes into. |
System.String | drawingsPath | Absolute path to the drawings. |
System.Collections.Generic.List<System.String> | lstRelationIds | List that will get relation id of the picture (used to remove parsed relations after parsing). |
System.Collections.Generic.Dictionary<System.String, System.Object> | dictItemsToRemove | Dictionary with archive items to remove after parsing. |
ParseDxfCollection(XmlReader)
Extracts Dxfs collection from XmlReader.
Declaration
public List<DxfImpl> ParseDxfCollection(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract data from. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<DxfImpl> | List of Dxf styles. |
ParseExtendedProperties(XmlReader)
Extracts extended properties from reader and inserts it workbook.
Declaration
public void ParseExtendedProperties(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract extended properties from. |
ParseHeaderFooter(XmlReader, PageSetupBaseImpl)
Parse header footer tags.
Declaration
public static void ParseHeaderFooter(XmlReader reader, PageSetupBaseImpl pageSetup)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get all necessary data from. |
PageSetupBaseImpl | pageSetup | Object that would store all extracted settings. |
ParseItemProperties(XmlReader, ref List<String>)
Parses the CustomXmlParts
Declaration
public string ParseItemProperties(XmlReader reader, ref List<string> schemas)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader |
System.Collections.Generic.List<System.String> | schemas | Schema Reference |
Returns
Type |
---|
System.String |
ParseLegacyDrawingHF(XmlReader, WorksheetBaseImpl, RelationCollection)
Parses header/footer drawings.
Declaration
public static void ParseLegacyDrawingHF(XmlReader reader, WorksheetBaseImpl sheet, RelationCollection relations)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
WorksheetBaseImpl | sheet | Worksheet to put data into. |
RelationCollection | relations |
ParseMergedCells(XmlReader, WorksheetImpl)
This methods extracts merged cells information from XmlReader.
Declaration
public void ParseMergedCells(XmlReader reader, WorksheetImpl sheet)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | Reader to get merge information from. |
WorksheetImpl | sheet | Parent worksheet. |
ParseNamedRanges(XmlReader)
This methods extracts named ranges from XmlReader.
Declaration
public void ParseNamedRanges(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | Reader to get information from. |
ParseNVCanvasProperties(XmlReader, IShape)
Parses non visual canvas properties.
Declaration
public static void ParseNVCanvasProperties(XmlReader reader, IShape shape)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
IShape | shape | Shape to store extracted data. |
ParsePageMargins(XmlReader, IPageSetupBase, IPageSetupConstantsProvider)
Parses page margins.
Declaration
public static void ParsePageMargins(XmlReader reader, IPageSetupBase pageSetup, IPageSetupConstantsProvider constants)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get values from. |
IPageSetupBase | pageSetup | Object to put extracted values into. |
IPageSetupConstantsProvider | constants |
ParsePageSetup(XmlReader, PageSetupBaseImpl)
Serialize PageSetup tag.
Declaration
public static void ParsePageSetup(XmlReader reader, PageSetupBaseImpl pageSetup)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get page setup values from. |
PageSetupBaseImpl | pageSetup | Object to put extracted values into. |
ParsePivotTables()
Parse pivot tables
Declaration
public void ParsePivotTables()
ParsePrintOptions(XmlReader, IPageSetupBase)
Parses print options.
Declaration
public static void ParsePrintOptions(XmlReader reader, IPageSetupBase pageSetup)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to parse print options from. |
IPageSetupBase | pageSetup | PageSetup object to put print options into. |
ParseRelations(XmlReader)
Extracts relations collection from XmlReader.
Declaration
public RelationCollection ParseRelations(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | Reader to extract data from. |
Returns
Type | Description |
---|---|
RelationCollection | Extracted relations collection. |
ParseSheet(XmlReader, WorksheetImpl, String, ref MemoryStream, ref MemoryStream, List<Int32>, Dictionary<String, Object>, Dictionary<Int32, Int32>)
Parses sheet (chart of worksheet).
Declaration
public void ParseSheet(XmlReader reader, WorksheetImpl sheet, string strParentPath, ref MemoryStream streamStart, ref MemoryStream streamCF, List<int> arrStyles, Dictionary<string, object> dictItemsToRemove, Dictionary<int, int> dictUpdatedSSTIndexes)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | Reader to get data from. |
WorksheetImpl | sheet | Sheet to parse. |
System.String | strParentPath | Absolute path to the parent worksheet item. |
System.IO.MemoryStream | streamStart | This stream will receive xml text starting just after "worksheet" tag to "col" or "sheetData" tag. |
System.IO.MemoryStream | streamCF | This stream contains conditional formatting. |
System.Collections.Generic.List<System.Int32> | arrStyles | List with new style indexes (index - old style index, value - new one). |
System.Collections.Generic.Dictionary<System.String, System.Object> | dictItemsToRemove | Dictionary with archive items to remove after parsing. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dictUpdatedSSTIndexes |
ParseSheetConditionalFormatting(XmlReader, WorksheetConditionalFormats, List<DxfImpl>)
Extracts worksheet conditional formats from XmlReader.
Declaration
public void ParseSheetConditionalFormatting(XmlReader reader, WorksheetConditionalFormats sheetConditionalFormats, List<DxfImpl> lstDxfs)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract data from. |
WorksheetConditionalFormats | sheetConditionalFormats | Worksheet conditional formats. |
System.Collections.Generic.List<DxfImpl> | lstDxfs | Dxf styles collection. |
ParseSST(XmlReader, Boolean)
Parses shared strings table.
Declaration
public Dictionary<int, int> ParseSST(XmlReader reader, bool parseOnDemand)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
System.Boolean | parseOnDemand |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | Dictionary with updated string indexes. |
ParseStringItem(XmlReader)
Parses string item.
Declaration
public int ParseStringItem(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
Returns
Type | Description |
---|---|
System.Int32 | Added string index. |
ParseStringItem(XmlReader, out String)
Parses string item.
Declaration
public int ParseStringItem(XmlReader reader, out string text)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
System.String | text |
Returns
Type | Description |
---|---|
System.Int32 | Added string index. |
ParseStyles(XmlReader, ref Stream)
Parses styles of the workbook.
Declaration
public List<int> ParseStyles(XmlReader reader, ref Stream streamDxfs)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to read styles data from. |
System.IO.Stream | streamDxfs | Stream that will get Dxfs formatting. |
Returns
Type |
---|
System.Collections.Generic.List<System.Int32> |
ParseThemeColors(XmlReader, out Dictionary<String, Color>)
Extracts theme colors.
Declaration
public List<Color> ParseThemeColors(XmlReader reader, out Dictionary<string, Color> dicThemeColors)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
System.Collections.Generic.Dictionary<System.String, Color> | dicThemeColors | Dictionary that will be filled with theme colors, key - color name, value - color value. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Color> | Returns theme colors list. |
ParseThemeElements(XmlReader)
Parse Theme Elements
Declaration
public List<Color> ParseThemeElements(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader |
Returns
Type |
---|
System.Collections.Generic.List<Color> |
ParseThemes(XmlReader)
Extracts themes.
Declaration
public List<Color> ParseThemes(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
Returns
Type |
---|
System.Collections.Generic.List<Color> |
ParseVmlShapes(XmlReader, ShapeCollectionBase, RelationCollection, String)
Parses Vml shapes.
Declaration
public void ParseVmlShapes(XmlReader reader, ShapeCollectionBase shapes, RelationCollection relations, string parentItemPath)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to get data from. |
ShapeCollectionBase | shapes | |
RelationCollection | relations | Corresponding relations collection. |
System.String | parentItemPath | Path to the parent item. |
ParseWebProperties(XmlReader, ExternalConnection)
Parse Web Properties
Declaration
public void ParseWebProperties(XmlReader reader, ExternalConnection Connection)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | |
ExternalConnection | Connection |
ParseWorkbook(XmlReader, RelationCollection, FileDataHolder, String, Stream, Stream, ref List<Dictionary<String, String>>, Stream, ref List<Dictionary<String, String>>)
Parses workbook part.
Declaration
public void ParseWorkbook(XmlReader reader, RelationCollection relations, FileDataHolder holder, string bookPath, Stream streamStart, Stream streamEnd, ref List<Dictionary<string, string>> lstBookViews, Stream functionGroups, ref List<Dictionary<string, string>> lstCustomBookViews)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | XmlReader to extract workbook part data from. |
RelationCollection | relations | Workbook relations. |
FileDataHolder | holder | Object that stores document data. |
System.String | bookPath | Absolute path in zip archive to the parent workbook. |
System.IO.Stream | streamStart | Stream that will get all xml tags before worksheets. |
System.IO.Stream | streamEnd | Stream that will get all xml tags after named ranges section. |
System.Collections.Generic.List<System.Collections.Generic.Dictionary<System.String, System.String>> | lstBookViews | Workbook views collection. |
System.IO.Stream | functionGroups | |
System.Collections.Generic.List<System.Collections.Generic.Dictionary<System.String, System.String>> | lstCustomBookViews |
ParseWorksheets(Dictionary<Int32, Int32>, Boolean)
Parse worksheets
Declaration
public void ParseWorksheets(Dictionary<int, int> dictUpdatedSSTIndexes, bool parseOnDemand)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dictUpdatedSSTIndexes | |
System.Boolean | parseOnDemand |
SkipWhiteSpaces(XmlReader)
Skips the white spaces in the XML.
Declaration
public static void SkipWhiteSpaces(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader |