473,322 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to read data from text file and write to Excel file using java code?

read and write data from text to excel
Jul 2 '15 #1
1 6501
chaarmann
785 Expert 512MB
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.
Jul 2 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mail2atulmehta | last post by:
Hi, I do not know if this is right place for this, but i need some help. I have a text file, whose values are seprated by a delimiter. I want to open this file in excel, ( not import it) . I have...
1
by: keyjen2017 | last post by:
i am trying to read the table in DB2 using JAVA code. then it is supposed to be copied in .txt file. how can i do this? other thing, i m passing date in dddd-mm-yy format from JAVA codeto call a ...
7
by: khunohm | last post by:
I would like to know how to select each item of data from text file transfer to each column in excel file. source 1..159662 /organism="Candidatus...
5
by: runsun | last post by:
Thanks in advance. This program is written in C. It needs to read all characters from a file; then write them into a 3D array (yes, 3D!). The file is a .prn file (one of the Excel types), which...
5
by: gaya3 | last post by:
Hi all, How to convert text file to excel file in java?? pl any one help me out... is ter any api..??
1
by: chrspta | last post by:
I am new to Visual basic. I need a program using VB6 that converts txt files to excel file.Description is in the below: The form should have the Drive list, Dir list, file list and cmdConvert...
2
by: jld730 | last post by:
Greetings! I am still new to Python, sorry! I have been searching through many posts on this subject and have attempted to TRY, but I feel really lost. So, any detailed guidance would be oh-so...
1
by: SagarDoke | last post by:
I have a txt file. I want to add the data from that file into the excel file using java. That data is delimited by spaces as follows: 1 Sagar Doke Address Roll No. City 2 ABC ...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
2
by: pulavarthipraveen | last post by:
Overview: We have a requirement in the c#.NET 1.0 windows application. There will be some input text file in the user’s machine. The user should browse and select the input text file and also select...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.