Bug 14486

Summary: VB macros cause "Error accessing file. Network connection may have been lost."
Product: POI Reporter: Aaron Arakawa <aarakawa>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Aaron Arakawa 2002-11-12 19:05:15 UTC
I ran jakarta-poi-1.9.0-dev-20021107's POIFSFileSystem.main on 2 .xls files 
with macros. They seemed to write out fine, but when I open the output file it 
gives the error "Error accessing file. Network connection may have been lost." 
The 2 VBA modules in the .xls seem to be intact and their names have been 
preserved, but one of them is empty while the other has VBA code. The macros do 
not appear on the list of macros to run in Tools->Macro->Macros. Thanks in 
advance for your help on this.
Comment 1 Aaron Arakawa 2002-11-12 19:24:57 UTC
I ran POIFSViewer on the input and output .xls files and they appear to be 
identical as far as I can tell, _VBA_PROJECT_CUR, VBA and its Modules, and all 
the __SRP_0, __SRP_1 documents, etc. are present in the output file, which is 
exactly the same size as the input file.

If you need any help resolving this problem I am available to code if provided 
some minor direction, my previous experience is I have hacked with the JExcel 
source to try to get macros working. Getting macros working is a top priority 
for us, so let me know any way I can help.
-Aaron
aarakawa@equilar.com
Comment 2 Aaron Arakawa 2002-11-12 19:43:53 UTC
I just did a unix diff between the input and output files and they "differ," 
though they are exactly the same size. Again the output of POIFSViewer does not 
differ between the two files, when compared with a unix diff.
cheers
-Aaron
Comment 3 Andy Oliver 2002-11-12 20:09:09 UTC
Are you sure you don't have an older version in the classpath?  Can you attach
the minimum amount of code necessary to reproduce and some sample files?
Comment 4 Aaron Arakawa 2002-11-12 20:44:28 UTC
Sorry, my mistake. Had an old POI in my classpath.
POI is awesome!