从 Flex ActionScript 导出数组数据
我想将保存在动作脚本数组中的数据导出为文本/CSV 文件。我搜索并发现了一些使用 datagrid 来实现 excel 导出的方法,但它们很复杂且令人困惑。我知道我必须创建一个脚本来处理这个问题,我想知道是否有这样做的例子?
我需要帮助: -在actionscript代码中调用脚本(我对此不太有经验,它可以像arrayToCVS(array)那样吗?) - 显示“下载”提示并允许用户保存 CSV,
谢谢!
I want to export the data kept in an actionscript array as a text/CSV file. I have searched and found a few that did datagrid to excel exports but they are complicated and confusing. I understand I have to create a script to handle this and I am wondering if there are examples of doing this?
I need help with:
-calling the script within actionscript code (I am not too experienced with this, can it just be something like arrayToCVS(array) ?)
-getting the "download" prompt to show up and allowing the user to save the CSV
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的东西应该对你有帮助。基本上它需要一个数组,创建多个标题列,并导出数组中的所有数据:
Something like this should help you. basically it takes an array, creates a number of header columns, and exports all data in the array: