Note that there are some explanatory texts on larger screens.

plurals
  1. POCSV to excel file
    text
    copied!<p>I am given a CSV file of below format and was asked to write a java pgm to read this csv in the same exact format without modifying.</p> <p>Initially, I changed the csv to excel file by saving it as excel workbook and started using JExcel api.Now, I have written a program that could read the excel version of this csv. Since, I have a pgm that reads excel version of this csv, what I am looking now is to read the csv using a java pgm and change it to excel.</p> <p>1) what would be a best way to change this csv to excel ... Also, I don't want to try openCSV,superCSV, CSV reader and stuff.</p> <p>2) Can Apache POI do that.If so, can anybody suggest me a working example.</p> <p>3) Also, jExcel doesn't support like remove operations on the original workbook while reading it.So, I had to work a little too much traversing every row and column and eliminating unnecessary rows.Now, in future if my csv format changes then I may have to redo lot of stuf</p> <p>My CSV Format: </p> <pre><code>Daily Blotter 8/12/2010 9:53 Tra Date Today Number Sys rate Trig Inst 5105 1.3 EUR Call 5106 EUR/USD 1.3 1.225 Reverse Knocking EUR Put 5107 EUR/USD 1.3 EUR Call If you observe, the rate column values are empty and they are actually in next column similarly, I have total empty columns too.Our csv could change its format in future too.In this scenario,if something new kicks in ,I may have to change the entire program or add the necessary logic.Is there any way I could know the generic way of writing the program that could fit my purpose. </code></pre> <p>Thanks for reading. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload