Click here to Skip to main content
15,886,137 members
Articles / Programming Languages / C#

A Very Easy to Use Excel XML Import-Export Library

Rate me:
Please Sign up or sign in to vote.
4.18/5 (86 votes)
25 Nov 2008CPOL13 min read 645.2K   19.6K   356  
Import export library for the Excel XML format, which reduces a programmer's work to the bare minimum.
<?xml version="1.0" encoding="utf-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="urn:schemas-microsoft-com:office:spreadsheet">
    <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
        <Author>Yogesh Jagota</Author>
    </DocumentProperties>
    <Styles>
        <Style ss:ID="Default">
            <Font ss:FontName="Tahoma" ss:Color="#000000" />
            <Alignment ss:Vertical="Bottom" />
        </Style>
        <Style ss:ID="S01">
            <Font ss:FontName="Tahoma" ss:Color="#000000" ss:Bold="1" />
            <Alignment ss:Vertical="Bottom" />
        </Style>
    </Styles>
    <Worksheet ss:Name="AgewiseOutstanding">
        <Table ss:FullColumns="1" ss:FullRows="1">
            <Column ss:Width="180" />
            <Column ss:Width="72" />
            <Column ss:Width="90" />
            <Column ss:Width="51" />
            <Column ss:Width="51" />
            <Column ss:Width="51" />
            <Column ss:Width="51" />
            <Column ss:Width="51" />
            <Column ss:Width="51" />
            <Column ss:Width="72" />
            <Row>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">Outstanding as on 23.07.2008 2:53:02 PM</Data>
                </Cell>
            </Row>
            <Row />
            <Row>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">Name of Party</Data>
                </Cell>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">RSM</Data>
                </Cell>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">ASM</Data>
                </Cell>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">0-30</Data>
                </Cell>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">31-60</Data>
                </Cell>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">61-90</Data>
                </Cell>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">91+</Data>
                </Cell>
                <Cell ss:StyleID="S01">
                    <Data ss:Type="String">Total</Data>
                </Cell>
            </Row>
            <Row>
                <Cell>
                    <Data ss:Type="String">M/s Stupid Paymaster</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="String">Mr. Nonsense</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="String">Mr. More Nonsense</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="Number">0</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="Number">5000</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="Number">45000</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="Number">0</Data>
                </Cell>
                <Cell ss:Formula="=Sum(R[0]C[-4]:R[0]C[-1])" />
            </Row>
            <Row>
                <Cell>
                    <Data ss:Type="String">M/s Good Paymaster</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="String">Mr. Good RSM</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="String">Mr. Good ASM</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="Number">32000</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="Number">0</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="Number">0</Data>
                </Cell>
                <Cell>
                    <Data ss:Type="Number">0</Data>
                </Cell>
                <Cell ss:Formula="=Sum(R[0]C[-4]:R[0]C[-1])" />
            </Row>
        </Table>
        <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
            <PageSetup>
                <Layout Orientation="Landscape" />
                <Header Margin="0.3" />
                <Footer Margin="0.3" />
                <PageMargins Bottom="0.4" Left="0.5" Right="0.5" Top="0.4" />
            </PageSetup>
            <Print>
                <ValidPrinterInfo />
                <FitHeight>1</FitHeight>
                <FitWidth>1</FitWidth>
                <Scale>100</Scale>
            </Print>
            <Selected />
            <FreezePanes />
            <FrozenNoSplit />
            <SplitHorizontal>3</SplitHorizontal>
            <TopRowBottomPane>3</TopRowBottomPane>
            <ActivePane>2</ActivePane>
            <Panes>
                <Pane>
                    <Number>3</Number>
                </Pane>
                <Pane>
                    <Number>2</Number>
                </Pane>
            </Panes>
        </WorksheetOptions>
    </Worksheet>
</Workbook>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India

Comments and Discussions