Click or drag to resize

ExcelXml Class

Reads the content from an Excel XML file (SpreadsheetML format).
Inheritance Hierarchy
SystemObject
  PDTec.IceNet.Domain.DX.Excel.XmlExcelXml

Namespace:  PDTec.IceNet.Domain.DX.Excel.Xml
Assembly:  PDTec.IceNet.Domain (in PDTec.IceNet.Domain.dll) Version: 7.2.0.0 (7.2.7583.15464)
Syntax
C#
public static class ExcelXml

The ExcelXml type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCleanXml
Applies a XML transformation to an Excel XML document and produces a simplified book/page/row/cell tree.
Public methodStatic memberGetData
Reads the content from an Excel XML file (SpreadsheetML format).
Top
Examples

This example shows how to read the content of a multi-page Excel XML file and to write it to the console.

using (Stream s = File.OpenRead("excel.xml"))
{
    using (XmlReader xrExcelXml = XmlReader.Create(s))
    {
        List<ExcelXml.Table> ltBook = ExcelXml.GetData(xrExcelXml);

        foreach (ExcelXml.Table pTable in ltBook)
        {
            Console.WriteLine("### {0} ###", pTable.Name);

            foreach (string[] aRow in pTable.Data)
            {
                Console.WriteLine(CsvWriter.Join(aRow));
            }
        }
    }
}
See Also