my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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

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

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: 3019

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

Joined: Oct 27, 2005
Posts: 19655

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

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 ... ...

I agree. Here's the link:
subject: how to write and read excel file
Similar Threads
Excel file manipulation
regarding excel sheet
Generate Excel file
create, read and write ms excel through j2ee( jsp, ejb, servlets)
Write to and read from Excel file