How to read excel file and convert it to tab delimited file with java – Education Career Blog

I have a directory where files are constantly updated. I need to read the latest excel file and convert it into tab delimited file. It is under windows. A batch + java solution will work for me. Or if I can use excel in command line programatically that also works

,

I would disagree with those people who recommend Apache POI. The best API that I know of for dealing with Excel is Andy Khan’s JExcel.

,

It has already been widely suggested, POI is probably the most complete “pure Java” implementation of Excel.

In one API you get support for Excel 2003 and 2007.

However, you need to be weary of its memory footprint. It is a hog. If you use it, make sure you use the event-driven model it supports as this will reduce footprint and execute faster.

,

In Java you can use, for example, Apache POI library to read data from Excel files. And then use standard Java facilities to write data into tab delimited file.

,

You can read in the excel sheet using POI and then iterate through the cells, writing them out to a separate file with appropriate delimiters.

,

Have a look at other SQ question: convert Excel to csv either using shell script or jython . if so how

I answered with PyODConverter, but there is jodconverter: Java version of this tool. It uses OpenOffice working as a service. I use it to convert between various file formats.

,

You can use Apache POI API for reading the excel file and OpenCSV for writing the CSV file.

Leave a Comment