You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by acichon89 <ac...@gmail.com> on 2012/09/26 10:15:42 UTC

Saving WorkBook deletes VBA modules

I'm using apache poi 3.8
ProActiveX.xls
<http://apache-poi.1045710.n5.nabble.com/file/n5711004/ProActiveX.xls>  

ProActive.xls is the file I'm working on.
Any, even the simples code (just read the file, and write) causes my new
excel file crashes when I want to load macros. My macros are in modules,
when I try to load macros I got error in Microsoft Excel that cannot load
the:

pop_Model
pop_pathNetworks
get_sim_options
get_user_distrib
pop_user_distrib
get_arrival_cycles
pop_arrival_cycles
get_path_networks
get_subroutines
pop_subroutines
pop_sim_options

When I load my VBA macros I can see blank page on this modules. 

Here is the way I do read/write in Java:

/File workbookFile = new File(PROACTIVEX_LOCATION);        
//PROACTIVE_LOCATION is just static String with path
FileInputStream fis = new FileInputStream(workbookFile);
this.wb = WorkbookFactory.create(fis);

FileOutputStream fileOut = new FileOutputStream(PROACTIVEX_LOCATION);
 wb.write(fileOut);
fileOut.close();/



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Saving-WorkBook-deletes-VBA-modules-tp5711004.html
Sent from the POI - Dev mailing list archive at Nabble.com.

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