简体   繁体   中英

How to copy data from xlsx file to a text file

How can I copy data from column A and B of an xlsx file to a text file using any of the following:

  • Excel VBA script
  • PHP
  • Java

I am on ubuntu 12.04.1, using Libreoffice for xlsx.

Also the words in the columns can have some special character like (ü,ö,é,Ř) , so the file can be ASCII only, and should be encoded in Unicode using the notation \\u + UTF-16 code point. Thus “é” becomes “\é” and “Ř” becomes “\Ř” .

For the Java case, you can use jXLS .

jXLS is a small and easy-to-use Java library for writing Excel files using XLS templates and reading data [emphasis added] from Excel into Java objects using XML configuration.

Once you have loaded the Excel information into a java object, it will be easy to export it to a text file using any of the IO's java strategies.

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