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 Murach's Java Servlets and JSP this week in the Servlets 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: 3011
    
  34

You should use something like Apache POI.


Founder of ExamLab and Systemup
See how I can help you to become an awesome programmer
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to write and read excel file
 
Similar Threads
regarding excel sheet
Generate Excel file
create, read and write ms excel through j2ee( jsp, ejb, servlets)
Write to and read from Excel file
Excel file manipulation