read and write data from text to excel
How to read data from text file and write to Excel file using java code?
Collapse
X
-
Reading data from a text file should be an easy exercise for you. You can find a lot of solutions in this forum. I also posted one several years ago here.
The more difficult part is how to save it in a way that Excel can read.
You can write it as text file in CSV format. That means, all values are separated by commas and quoted. Excel can import CSV without any problems.
If you need more (inserting formulas, formatting cells etc.) then you can use the apache POI interface (google for it) to write the binary data. Or you write it as text file in new Office Open XML format, which can be read in only by newer Excel versions.
Comment