简体   繁体   English

如何将数据从数组导出到Excel电子表格?

[英]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. 我有一个100元素的整数数组,我想导出到电子表格中。 Array[0] goes to A1, Array[2] goes to A2, etc. Array [0]转到A1,Array [2]转到A2,依此类推。

I've downloaded JExcelAPI, but I can't follow the tutorials because the tool is for pretty advanced tasks. 我已经下载了JExcelAPI,但是由于该工具用于执行高级任务,因此无法遵循这些教程。

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) 尝试Apache POI ... http://poi.apache.org/我相信这是创建Microsoft Office文档的最佳API。(MS Visio除外,因为您无法使用此API创建visio文件)

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. 如果您不想使用OpenXML或jexcel API(虽然没有那么复杂),请考虑使用简单的.csv文件。 .csv are easily opened by Excel. .csv可以通过Excel轻松打开。
So what you would need is to write your integers to a file like this: 1;2;23;;4;5;5;1; 因此,您需要将整数写入这样的文件:1; 2; 23 ;; 4; 5; 5; 1; and when it is opened in Excel, you'll get exactly what you need. 当它在Excel中打开时,您将获得所需的确切信息。

暂无
暂无

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

相关问题 如果文档格式不同,如何将数据从Java导出到Excel或Word? - How can I export data from Java to Excel or Word if documents have different forms? 如何将Excel电子表格配置为javax.sql.DataSource? - How can I configure an Excel spreadsheet as a javax.sql.DataSource? 如何从 Java 在 Excel 电子表格中调用 VBA 代码? - How do I call VBA code in an Excel spreadsheet from Java? 如何从 txt 文件中获取数据并将其发送到 Excel 电子表格?(我只想要 txt 文件中“:”之后的所有内容)? - How do i get data from a txt file and send it to excel spreadsheet?(I only want everything after the “:” in the txt file)? 如何从jasper导出到具有图像和单元格边框的jasper标准excel文件,并且excel文件看起来像普通的excel文件? - how can i export to Standard excel file from jasper with the image and cell border and the excel file look likes normal excel file? 无法将数据表从jsf页导出到Excel - Can't export data table to excel from jsf page 尝试将数据从网站写入 Excel 电子表格 - Trying to write data from a website to an Excel spreadsheet 如何使用Spring,Hibernate和PostgreSQL将数据导出到Excel? - How do I Export Data to Excel using Spring, Hibernate, and PostgreSQL? 如何使用Apache POI导出到excel树状结构? - How I can export to excel a tree hierarchy using Apache POI? 如何将数据从SQlite导出到CSV或Excel或什么? - How to export data from SQlite to CSV or Excel or just anything?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM