有什麼方法可以在iOS中以編程方式創建Excel文件?以編程方式創建.xls文件
3
A
回答
0
你可以看看Creating Excel (.xlsx) files in Cocoa
如果您需要保存的數據是簡單的,你也可以只將它保存爲.cvs文件,而不是http://en.wikipedia.org/wiki/Comma-separated_values
2
這是一個剝離下來XLS文件的XML表示的版本,只需像這樣創建一個原始XML ...並將其另存爲XLS。
<?xml version="1.0"?>
<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">
<Version>14.0</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>11720</WindowHeight>
<WindowWidth>25600</WindowWidth>
<WindowTopX>0</WindowTopX>
<WindowTopY>0</WindowTopY>
<TabRatio>600</TabRatio>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:Color="#000000"/>
<NumberFormat/>
</Style>
<Style ss:ID="s62">
<Interior/>
<Protection/>
</Style>
<Style ss:ID="s63">
<Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="Apple Inc">
<Table x:FullColumns="1"
x:FullRows="1" ss:StyleID="s62" ss:DefaultColumnWidth="53"
ss:DefaultRowHeight="12">
<Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="90"/>
<Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="180"/>
<Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="60" ss:Span="5"/>
<Column ss:Index="9" ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="48"/>
<Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="60"/>
<Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="48"/>
<Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="90" ss:Span="1"/>
<Column ss:Index="14" ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="300"/>
<Column ss:StyleID="s62" ss:AutoFitWidth="0" ss:Width="55" ss:Span="1"/>
<Row ss:AutoFitHeight="0" ss:Height="20">
<Cell ss:StyleID="s63"><Data ss:Type="String">Room</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Description</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">level</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">level</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">level</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">level</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Date</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Audit</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Risk</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Value</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Score</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">ScoreName</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Action</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Comments</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Test</Data></Cell>
<Cell ss:StyleID="s63"><Data ss:Type="String">Test</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="Number">data value</Data></Cell>
<Cell><Data ss:Type="Number">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">data value</Data></Cell>
<Cell><Data ss:Type="String">Vau</Data></Cell>
<Cell><Data ss:Type="String">Test</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>
<Unsynced/>
<Print>
<ValidPrinterInfo/>
<HorizontalResolution>600</HorizontalResolution>
<VerticalResolution>600</VerticalResolution>
</Print>
<PageLayoutZoom>0</PageLayoutZoom>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>15</ActiveRow>
<ActiveCol>13</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
<AllowFormatCells/>
<AllowSizeCols/>
<AllowSizeRows/>
<AllowInsertCols/>
<AllowInsertRows/>
<AllowInsertHyperlinks/>
<AllowDeleteCols/>
<AllowDeleteRows/>
<AllowSort/>
<AllowFilter/>
<AllowUsePivotTables/>
</WorksheetOptions>
</Worksheet>
</Workbook>
你將能夠創造過不同的風格,
<Style ss:ID="s63">
<Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
<Protection/>
</Style>
+0
你真的希望有人寫一個圖書館來處理,雖然... – Thilo
+0
@Thilo,同意! – doNotCheckMyBlog
相關問題
- 1. 以編程方式在magento 1.7中創建一個.xls文件
- 2. 以編程方式創建ZIP文件
- 3. 以編程方式創建.pfx文件
- 4. 以編程方式創建.edmx文件
- 5. 以編程方式創建designer.cs文件
- 6. 是否可以通過iPhone以編程方式創建.xls文件?
- 7. vb.net以編程方式創建控件
- 8. REALBasic - 以編程方式創建控件
- 9. 我可以在xcode中編程創建一個.xls文件嗎?
- 10. 以編程方式在C#中創建KMZ文件KML文件
- 11. 以編程方式在特定文件夾中創建文件
- 12. 以編程方式確定Excel文件(.xls)是否包含宏
- 13. 創建文件.xls
- 14. 以編程方式創建文件以便導入Quicken?
- 15. 以編程方式創建VS解決方案/項目文件
- 16. 以編程方式在客戶端創建文本文件
- 17. 以編程方式創建流程圖
- 18. 如何以編程方式創建.ics文件?
- 19. 如何在iOS上以編程方式創建.txt文件
- 20. 如何以編程方式創建vcf文件?
- 21. heroku - 以編程方式創建的文件被覆蓋
- 22. 以編程方式打開剛剛創建的文件
- 23. 以編程方式在C++中創建Excel文件
- 24. 在umbraco中以編程方式創建成員配置文件
- 25. 如何以編程方式創建ecore文件的實例
- 26. 以編程方式創建/運行命令文件
- 27. 在iOS中以編程方式創建AAC文件?
- 28. 如何以編程方式從PDF文件創建PDF書籤?
- 29. 以編程方式在PDF文件中創建鏈接
- 30. 以編程方式創建矢量文件?
嗯,塊引用? –
沒有答案,但同樣的問題:http://stackoverflow.com/questions/15269767/how-to-create-a-custom-xls-file-programatically?rq=1和http://stackoverflow.com/questions/ 10818207 /創建excel-xls-files-on-ios和http://stackoverflow.com/questions/11535772/iphone-sdk-export-data-to-xls-not-via-csv?lq=1 – Thilo