Thanks. I had actually looked at the HOW-TO's first, but the examples didn't seem to 
be doing quite what I needed. I did find that by using POIFSFileSystem object, it 
copied without warnings:

private void copyWorkBook()
{
<snip/>
File template = new File(original_excel_file);
File newFile = new File(newFileName);
POIFSFileSystem pfs = new POIFSFileSystem(new FileInputStream(template));
pfs.writeFileSystem(new FileOutputStream(newFile));
<code to open the new file and modify as needed/>
}



----- Original Message -----
From: "KHZ (SAW)" <[EMAIL PROTECTED]>
Date: Wednesday, September 1, 2004 3:50 am
Subject: AW: HSSF copy workbook

> Hi Javagee.
> 
> Look at
> 
> http://jakarta.apache.org/poi/hssf/how-to.html
> .
> 
> There's a sample and a further link to the HSSF sample class. Just 
> opena file similar to what you see there and write it using a 
> differentname.
> 
> Such warnings still can come if Excel files are "not so clean". We had
> such problems when copying and changing Excel files instead of 
> buildingthem from the scratch (just Excel, not using POI).
> 
> Regards,      Karl-Heinz.
> 
> 
> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED] [EMAIL PROTECTED] 
> Gesendet: Freitag, 27. August 2004 22:45
> An: [EMAIL PROTECTED]
> Betreff: HSSF copy workbook
> 
> I am very new to POI/HSSF. I need to copy a workbook that has a 
> good bit
> of formatting, formulas and a couple of macros. When I use standard
> Input/Ouptut streams, and then try to use HSSF to modify the new 
> file, I
> see a lot of warnings like the following:
> 
> 
> [WARNING] Unknown Ptg 2a (42) at cell (1,35)
> 
> Is POIFS a better way to copy a workbook? Can someone give me a quick
> code snippet?
> 
> Thanks in advance.
> 
> 
> -------------------------------------------------------------------
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to