Bug 6882 - Modifying an existing file - Problem when existing file contains a macro
Summary: Modifying an existing file - Problem when existing file contains a macro
Status: RESOLVED DUPLICATE of bug 10213
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: PC All
: P3 normal with 2 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-05 16:08 UTC by Mose IADAROLA
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments
excel file containing a macro which I tried to modify (19.50 KB, application/ms-excel)
2002-03-05 16:12 UTC, Mose IADAROLA
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mose IADAROLA 2002-03-05 16:08:21 UTC
Hello,

I am trying to modify an existing Excel-file containing a macro. 

The first step runs without any problems. I could read the Excel-file and read 
or modify individual cells. 

But when I am trying to write back the file, I become a NullPointerException.

//read excel
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(args[0]));
HSSFWorkbook wb = new HSSFWorkbook(fs);
//modify
//...

//write excel
FileOutputStream stream = new FileOutputStream(args[1]);
wb.write(stream);//throws NullPointerException
stream.close();

(it is not possible to attach the Excel-file containing the macro)


Kind regards,

Mose
Comment 1 Mose IADAROLA 2002-03-05 16:12:09 UTC
Created attachment 1295 [details]
excel file containing a macro which I tried to modify
Comment 2 Glen Stampoultzis 2002-03-31 00:24:26 UTC
Macro's are stored in separate streams in the document.  At present there is no 
plans to support this for 1.5
Comment 3 Andy Oliver 2002-09-02 02:45:19 UTC
ddsasa
Comment 4 Andy Oliver 2002-09-02 02:45:35 UTC

*** This bug has been marked as a duplicate of 10213 ***