使用javascript创建csv文件 [英] Create csv file using javascript
问题描述
可以解释一下我是否有办法将html5本地存储数据转换为csv文件并将其存储在ipad中。
can some explain me is there a way to convert the html5 local storage data into a csv file and store it inside ipad.
我有一个html页面有一些文本字段。当用户单击提交按钮时,它将存储在html5本地存储中。然后我需要使用该数据来创建一个csv文件并将其存储在本地ipad应用程序中。
i have an html page with some text fields. when user click the submit button it is stored inside the html5 local storage. then i need to use that data to create a csv file and store it locally inside ipad app.
让我告诉我的要求。 1)从html页面获取文本字段数据并将其保存到我的本地存储2)从本地存储获取数据并写入csv文件并将其保存在ipad中3)将该文件附加到我的应用程序的电子邮件中它自我,所以我需要文件路径和文件名将其作为附件发送。 4)我写了一个目标c函数,它发送数据5)我从javascript调用目标函数
Let me tell my requirement. 1) get the text field data from the html page and save it to my local storage 2) get the data from the local storage and write into a csv file and save it inside an ipad 3) attach that file to the email from my app it self so i need the file path and file name to send it as attachment. 4)i have written an objective c function which sends the data 5) i call the objective function from javascript
这些东西是在使用html5和javascript的ipad应用程序中完成的/ p>
These things are done in ipad application which uses html5 and javascript
推荐答案
要使用JavaScript将文件写入系统,您需要使用HTML5文件编写器API(我可以用HTML5 / JS编写文件吗?。
To write a file to the system using JavaScript, you would need to use the HTML5 File Writer API (Can I write files with HTML5/JS?).
这篇关于使用javascript创建csv文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!