You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by rehman abdul <ar...@yahoo.com> on 2004/04/05 09:13:12 UTC

nnedxhelp


exuereb@di-ve.com wrote:Hi all

I've just started experimenting with POI. I encountered a problem which I
didn't manage to find any help on it. I started with a simple code like
this which simply reads an excel file and writes it back into a new file
without modifying it (I think).

try {
iStream = new FileInputStream("Errors Analysis.xls");
fs = new POIFSFileSystem(iStream);
wb = new HSSFWorkbook(fs);
oStream = new FileOutputStream("wb2.xls");
wb.write(oStream);
} catch (Exception e) {
e.printStackTrace();
System.exit(0);
} finally {
if (iStream != null) {
try {
iStream.close();
} catch (Exception e) {
iStream = null;
}
}
if (oStream != null) {
try {
oStream.close();
} catch (Exception e) {
oStream = null;
}
}
}



With a simple excel file this works fine. But if in the excel file I have
a graph, or an image, or a pivot table, then the file gets corrupted and
looses all formatting. I read that POI is not able to format such objects
but it does support them.
Is this something wrong with POI or am I doing something wrong? I'm using
the latest API, Windows XP and JDK 1.3.1. I tried working on a 2002 and
2003 format excel file.

Thanks
Edward



_________________________________________________________________ 
Send your loved ones Easter Eggs and Figolli this Easter. Shop online at http://shop.di-ve.com

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org



---------------------------------
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today