简体   繁体   中英

How can I export data from an array to an Excel spreadsheet?

Sorry if tutorials for this already exist, but the only help I can find is much more advanced than for what I'm trying to accomplish.

I have a 100 element array of integers that I want to export into a spreadsheet. Array[0] goes to A1, Array[2] goes to A2, etc.

I've downloaded JExcelAPI, but I can't follow the tutorials because the tool is for pretty advanced tasks.

try Apache POI... http://poi.apache.org/ i believe this best API for creating microsoft office documents.. (Except MS Visio because you cannot create visio files with this API)

try this....

If you don't want to use OpenXML or jexcel API, which is not as complicated as you are talking about it, consider using a simple .csv file. .csv are easily opened by Excel.
So what you would need is to write your integers to a file like this: 1;2;23;;4;5;5;1; and when it is opened in Excel, you'll get exactly what you need.

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