Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm a beginner in java,just know the concepts only. Can anyone provide the sample codes for converting .txt to excel format.Please help me.
Posted
Updated 19-Dec-13 18:19pm
v2
Comments
Maciej Los 19-Dec-13 2:32am    
What have you done till now? Where are you stuck?
Member 10476112 20-Dec-13 0:45am    
I know the logic.It involves reading the text file using fileinputstream,datainputstream,buffered reader.By creating array list and store those line in array list.By creating a workbook,sheet,row and cell, set the values for each column cell.using iterator split the line and assign it to each column cell.set the splitted values to column cell.using the fileoutputstream write the values in the excel sheet. But because of lack in syntax i'm unable to code.

I assume you want to convert csv file to XLS format. Please refer to this [LINK].
 
Share this answer
 
though JExcel is nice API for handling Excel files.i would suggest you to go for apache POI which supports the latest XLSX file format.its has lot of methods for formatting cells,handling sheets and workbooks.
this URL would be place to start

http://poi.apache.org/spreadsheet/quick-guide.html
 
Share this answer
 
I'm a beginner in java,just know the concepts only. Can anyone provide the sample codes for converting .txt to excel format.Please help me.
 
Share this answer
 
Comments
H.Brydon 19-Dec-13 9:36am    
This isn't a solution. If you have details to add to your question, you should edit the question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900