aspose file tools*
The moose likes Other Open Source Projects and the fly likes Create a copy of excel work sheet using POI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Create a copy of excel work sheet using POI" Watch "Create a copy of excel work sheet using POI" New topic
Author

Create a copy of excel work sheet using POI

Sylvia Crissy
Greenhorn

Joined: May 14, 2008
Posts: 8
Hi all,
Is there any method to create a copy(save as) of an existing excel worksheet using POI api.

Kindly help with some sample programs.

Thanks in advance
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42281
    
  64
Why do you want to use POI for this? Using File, FileInputStream and FileOutputStream is sufficient.


Ping & DNS - my free Android networking tools app
Sylvia Crissy
Greenhorn

Joined: May 14, 2008
Posts: 8
Hi Ulf,
I need to read an excel sheet.


Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42281
    
  64
Just about every possible operation is shown with examples in the POI documentation, including opening an XLS file, accessing a sheet, creating a new workbook and sheet, and saving it. Does that cover what you need to do?
Paul Michael
Ranch Hand

Joined: Jul 02, 2001
Posts: 697
Ulf is right, if you just need an exact copy of the file, you can simply use java.io.

But if you need to read the contents and make some modifications before making the copy, then you will have to work with POI or JExcel.

I strongly suggest that you checkout JExcel. Its API to read excel documents is much simpler (IMO).



SCJP 1.2 (89%), SCWCD 1.3 (94%), IBM 486 (90%), SCJA Beta (96%), SCEA (91% / 77%), SCEA 5 P1 (77%), SCBCD 5 (85%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create a copy of excel work sheet using POI