diff options
author | Nick Burch <nick@apache.org> | 2016-03-09 10:57:52 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2016-03-09 10:57:52 +0000 |
commit | a20e6a38d34973a2977172d5bcdeb447b79397ae (patch) | |
tree | 5bf6d537d79caf4f1d7c8fbd541bd101d8a0dadd /test-data | |
parent | 08bfa54296af5e5e01e7effafaf6aa860d20b0d6 (diff) | |
download | poi-a20e6a38d34973a2977172d5bcdeb447b79397ae.tar.gz poi-a20e6a38d34973a2977172d5bcdeb447b79397ae.zip |
More helpful exception message if POIFS is given a raw XML file (eg an Office 2003 XML file), plus tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734215 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test-data')
-rw-r--r-- | test-data/spreadsheet/SampleSS.xml | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/test-data/spreadsheet/SampleSS.xml b/test-data/spreadsheet/SampleSS.xml new file mode 100644 index 0000000000..45cd58cec1 --- /dev/null +++ b/test-data/spreadsheet/SampleSS.xml @@ -0,0 +1,142 @@ +<?xml version="1.0"?>
+<?mso-application progid="Excel.Sheet"?>
+<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
+ 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">
+ <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
+ <Title>Sample Spreadsheet</Title>
+ <Subject>Spreadsheet for testing</Subject>
+ <Author>Nick Burch</Author>
+ <Keywords>Testing Sample Formulas</Keywords>
+ <Description>This is a sample spreadsheet, for use when testing things</Description>
+ <LastAuthor>Nick Burch</LastAuthor>
+ <Created>2008-01-04T11:51:36Z</Created>
+ <LastSaved>2008-01-04T11:56:04Z</LastSaved>
+ <Version>14.00</Version>
+ </DocumentProperties>
+ <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
+ <AllowPNG/>
+ </OfficeDocumentSettings>
+ <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
+ <WindowHeight>5580</WindowHeight>
+ <WindowWidth>11295</WindowWidth>
+ <WindowTopX>360</WindowTopX>
+ <WindowTopY>60</WindowTopY>
+ <ActiveSheet>1</ActiveSheet>
+ <ProtectStructure>False</ProtectStructure>
+ <ProtectWindows>False</ProtectWindows>
+ </ExcelWorkbook>
+ <Styles>
+ <Style ss:ID="Default" ss:Name="Normal">
+ <Alignment ss:Vertical="Bottom"/>
+ <Borders/>
+ <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
+ <Interior/>
+ <NumberFormat/>
+ <Protection/>
+ </Style>
+ <Style ss:ID="s62">
+ <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#FF0000"/>
+ </Style>
+ <Style ss:ID="s63">
+ <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#1F497D"
+ ss:Bold="1"/>
+ <Interior ss:Color="#FFFF00" ss:Pattern="Solid"/>
+ </Style>
+ </Styles>
+ <Worksheet ss:Name="First Sheet">
+ <Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="4" x:FullColumns="1"
+ x:FullRows="1" ss:DefaultRowHeight="15">
+ <Row>
+ <Cell><Data ss:Type="String">Test spreadsheet</Data></Cell>
+ </Row>
+ <Row>
+ <Cell><Data ss:Type="String">2nd row</Data></Cell>
+ <Cell><Data ss:Type="String">2nd row 2nd column</Data></Cell>
+ </Row>
+ <Row ss:Index="4">
+ <Cell ss:StyleID="s62"><Data ss:Type="String">This one is red</Data></Cell>
+ </Row>
+ </Table>
+ <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
+ <PageSetup>
+ <Header x:Margin="0.3"/>
+ <Footer x:Margin="0.3"/>
+ <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
+ </PageSetup>
+ <Print>
+ <ValidPrinterInfo/>
+ <PaperSizeIndex>0</PaperSizeIndex>
+ <VerticalResolution>0</VerticalResolution>
+ <NumberofCopies>0</NumberofCopies>
+ </Print>
+ <Panes>
+ <Pane>
+ <Number>3</Number>
+ <RangeSelection>R1C1:R4C2</RangeSelection>
+ </Pane>
+ </Panes>
+ <ProtectObjects>False</ProtectObjects>
+ <ProtectScenarios>False</ProtectScenarios>
+ </WorksheetOptions>
+ </Worksheet>
+ <Worksheet ss:Name="Sheet Number 2">
+ <Table ss:ExpandedColumnCount="4" ss:ExpandedRowCount="7" x:FullColumns="1"
+ x:FullRows="1" ss:DefaultRowHeight="15">
+ <Row>
+ <Cell><Data ss:Type="String">Start of 2nd sheet</Data></Cell>
+ </Row>
+ <Row>
+ <Cell><Data ss:Type="String">Sheet 2 row 2</Data></Cell>
+ </Row>
+ <Row ss:Index="4">
+ <Cell ss:StyleID="s63"><Data ss:Type="String">I'm in bold blue, on a yellow background</Data></Cell>
+ </Row>
+ <Row ss:Index="6">
+ <Cell><Data ss:Type="String">cb=1</Data></Cell>
+ <Cell><Data ss:Type="String">cb=10</Data></Cell>
+ <Cell><Data ss:Type="String">cb=2</Data></Cell>
+ <Cell><Data ss:Type="String">cb=sum</Data></Cell>
+ </Row>
+ <Row>
+ <Cell><Data ss:Type="Number">1</Data></Cell>
+ <Cell><Data ss:Type="Number">10</Data></Cell>
+ <Cell><Data ss:Type="Number">2</Data></Cell>
+ <Cell ss:Formula="=SUM(RC[-3]:RC[-1])"><Data ss:Type="Number">13</Data></Cell>
+ </Row>
+ </Table>
+ <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
+ <PageSetup>
+ <Header x:Margin="0.3"/>
+ <Footer x:Margin="0.3"/>
+ <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
+ </PageSetup>
+ <Selected/>
+ <Panes>
+ <Pane>
+ <Number>3</Number>
+ <ActiveRow>6</ActiveRow>
+ <ActiveCol>3</ActiveCol>
+ </Pane>
+ </Panes>
+ <ProtectObjects>False</ProtectObjects>
+ <ProtectScenarios>False</ProtectScenarios>
+ </WorksheetOptions>
+ </Worksheet>
+ <Worksheet ss:Name="Sheet3">
+ <Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
+ x:FullRows="1" ss:DefaultRowHeight="15">
+ </Table>
+ <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
+ <PageSetup>
+ <Header x:Margin="0.3"/>
+ <Footer x:Margin="0.3"/>
+ <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
+ </PageSetup>
+ <ProtectObjects>False</ProtectObjects>
+ <ProtectScenarios>False</ProtectScenarios>
+ </WorksheetOptions>
+ </Worksheet>
+</Workbook>
|