如何通过我的 iPhone以编程方式生成.xls文件?
4 回答
If you just want to put tabulated data into an spreadsheet, simply generate a .CSV file that can be directly read into EXCEL.
If you want a fully featured spreadsheet, with multiple sheets, formulas, formats, inserted objects, pictures, charts etc, then, as far as I know, there is no solution for iPhone, as Microsoft does not provide the equivalent to its Excel ActiveX component.
If your requirements lie in between, you might try some alternatives. Take a look at Google Docs or at QuickOffice.
I don't recommend you to try to generate a full XLS from scratch, if far too much dificult.
我有替代解决方案给你。
使用代码创建(逗号分隔值)文件很容易,CSV
然后这个 CSV 文件可以直接由 MS Excel 以 xls 格式打开。
如果需要在手机上查看,请创建一个 HTML 表格;一般来说,xls 对于数据交换格式来说是一个糟糕的选择。
我之前没有搜索过有关此的第三方库,但至少您可以(但不容易)根据 XLS 文件格式的规范自己生成 XLS 文件: