wood burning stoves 2.0*
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
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: 3051
    
  36

You should use something like Apache POI.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to write and read excel file