우선 excel을 xml 포멧으로 다중 시트를 만들어야 하기 때문에 아래 포멧을 사용해야 한다.
접기
<?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:>
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office" >
<Author>Darl McBride</Author>
<LastAuthor>Bill Gates</LastAuthor>
<Created>2007-03-15T23:04:04Z</Created>
<Company>SCO Group, Inc.</Company>
<Version>11.8036</Version>
</DocumentProperties>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel" >
<WindowHeight>6795</WindowHeight>
<WindowWidth>8460</WindowWidth>
<WindowTopX>120</WindowTopX>
<WindowTopY>15</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal" >
<Alignment ss:Vertical="Bottom" />
<Borders />
<Font />
<Interior />
<NumberFormat />
<Protection />
</Style>
<Style ss:ID="s21" >
<Font x:Family="Swiss" ss:Bold="1" />
</Style>
</Styles>
<Worksheet ss:Name="Sheet1" >
<Table ss:ExpandedColumnCount="6" ss:ExpandedRowCount="65535"
x:FullColumns="1" x:FullRows="1" >
<Row>
<Cell>
<Data ss:Type="String " >: 20090810 ~ 20090811</Data>
</Cell>
</Row>
<Row>
<Cell ss:StyleID="s21" >
<Data ss:Type="String " >a</Data>
</Cell>
<Cell ss:StyleID="s21" >
<Data ss:Type="String " >b</Data>
</Cell>
<Cell ss:StyleID="s21" >
<Data ss:Type="String " >c</Data>
</Cell>
<Cell ss:StyleID="s21" >
<Data ss:Type="String " >d</Data>
</Cell>
<Cell ss:StyleID="s21" >
<Data ss:Type="String " >e</Data>
</Cell>
<Cell ss:StyleID="s21" >
<Data ss:Type="String " >CTR</Data>
</Cell>
</Row>
</Table>
<WorksheetOptions xmlns='urn:schemas-microsoft-com:office:excel'>
<Print>
<ValidPrinterInfo />
<HorizontalResolution>600</HorizontalResolution>
<VerticalResolution>600</VerticalResolution>
</Print>
<Selected />
<Panes>
<Pane>
<Number >3</Number >
<ActiveRow>5</ActiveRow>
<ActiveCol>1</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>
접기
위의 것은 간단한 예제 시트인데 설명을 하자면 다음과 같다.
<Author> : 작성자
<LastAuthor> : 마지막 작성자
<Created> : 생성일
<Company> : 회사
<Version> : 파일 버전
<Styles> : 셀의 style을 지정한다.
<Worksheet ss:Name="Sheet1"> 요게 시트의 구분이다 요 포멧으로 묶여 있는 애들이 1개의 시트가 된다.
xml에서 아래처럼 만들면
엑셀파일을 엑셀로 열었을 때 다중시트가 생긴다.
파일이 열리지 않는다.
일종의 최대 크기를 지정한다고 보면 된다.