简体   繁体   中英

Flex/AIR: Export DataGrid to Excel with multiple sheets

I have an AIR application with two DataGrids that I would like to export to Excel. I've found the as3xls library, but it can only handle one sheet (as per the comments). Ideally, I'd like to export both DataGrids into separate sheets in the same workbook.

The AIR application is running entirely on the user's desktop and doesn't have a connection to any server, so the solution would need to be Flex/AIR only. Any suggestions?

Checkout AIR 2.0's NativeProcess class, it let's you call external/system commands. I'm calling a Python script to merge 2 worksheets created by AS3XLS. The biggest issue is that AS3XLS writes a lot of garbage. Am going to try exporting the datagrids as CSV and then let Python's XLRD/XLWT modules do the Excel stuff.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM