简体   繁体   English

如何在Titanium Appcelerator中创建XLS文件?

[英]How to create a xls file in titanium appcelerator?

I have to send a report in xls format in my application. 我必须在我的应用程序中以xls格式发送报告。 And it's costly for me to create an API to receive the data and send the xls. 对于我来说,创建一个API来接收数据并发送xls成本很高。 I tried to use some code but all of them is in node.js, and I can't find a CommonJs(module, plugin, etc) for create the xls. 我尝试使用一些代码,但是所有代码都在node.js中,并且找不到用于创建xls的CommonJs(模块,插件等)。

Can someone help me to create the xls in titanium? 有人可以帮助我在钛合金中创建xls吗?

Thanks 谢谢

You didn't mention which libraries you've tested. 您没有提到测试过的库。 This might be one to try out: https://github.com/SheetJS/js-xlsx 这可能是一个可以尝试的方法: https : //github.com/SheetJS/js-xlsx

But does it really need to be a xls file? 但这真的需要一个xls文件吗? If you don't need any styling or special features you could create a cvs file and send this. 如果您不需要任何样式或特殊功能,则可以创建一个cvs文件并将其发送。 Excel will open them and display rows/columns just fine. Excel将打开它们并显示行/列。

And if it has to be a XSL file you really should look at a server side implementation eg with https://github.com/PHPOffice/PHPExcel . 并且如果必须是XSL文件,则您实际上应该查看服务器端的实现,例如,使用https://github.com/PHPOffice/PHPExcel For the "API" you could just call an URL with GET parameters to pass the data (if it doesn't have to be secure) 对于“ API”,您可以仅调用带有GET参数的URL来传递数据(如果它不一定安全)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Titanium Appcelerator 中创建带有复选框设置的列表视图 - How to create a listview with checkbox settings in Titanium Appcelerator 如何在appcelerator Titanium中将WKWebView与本地文件一起使用? - How to use WKWebView with local file in appcelerator Titanium? 在钛制加速器中创建图像滑块 - create image slider in titanium appcelerator 如何使用 Titanium Appcelerator 在您的应用程序中创建复选框首选项区域? - How to create a checkbox preferences area in your app using Titanium Appcelerator? 如何在Appcelerator /钛金属Android中无间隔地创建Android服务? - How to create Android Service Without interval in Appcelerator/titanium Android? 如何用钛创建文件? - How to create a file in titanium? appcelerator titanium:创建一个新文件 - appcelerator titanium: Creating a new file Appcelerator Titanium-openFileChooserDialog不存在:如何打开对话框浏览文件? - Appcelerator Titanium - openFileChooserDialog does not exist: How to open a dialog to browse for a file? 在Android中使用Titanium Appcelerator创建粘性标题 - create sticky headers in Android with titanium appcelerator 在Titanium Appcelerator中使用Loop创建元素和addEventListener - Create elements and addEventListener with Loop in Titanium Appcelerator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM