File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes how to write and read  excel file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to write and read  excel file" Watch "how to write and read  excel file" New topic
Author

how to write and read excel file

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I know how to write and read from text file in java.
is it same as write to Excel file?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

No--Excel files aren't text.
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
this is the way i am going to write a text to in java


if i need to write this text to Excel file how to do this?



Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2885
    
  13

You should use something like Apache POI.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
My Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Use a library for it. Apache POI and JExcelApi are the best known libraries for Excel. See also AccessingFileFormats.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jim Hoglund
Ranch Hand

Joined: Jan 09, 2008
Posts: 525
It is common to import data into excel from a comma-separated (.csv) file.
Just write your data in a regular pattern with a comma between each field.
Excel will also recognize a different delimiter on import. I like to use the
pipe symbol "|" because it doesn't appear very often in text data.

Jim ... ...


BEE MBA PMP SCJP-6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to write and read excel file
 
Similar Threads
regarding excel sheet
Excel file manipulation
create, read and write ms excel through j2ee( jsp, ejb, servlets)
Generate Excel file
Write to and read from Excel file