Bug 46660

Summary: How to unhide a hidden Workbook?
Product: POI Reporter: Matthew <matthew.knl>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.5-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: sample hidden workbook

Description Matthew 2009-02-04 00:18:36 UTC
Created attachment 23223 [details]
sample hidden workbook

I have an Excel file (please check the attachment) which is hidden when opening by MS Excel. Is it possible to make it unhide by POI? Thanks a lot!
Comment 1 Josh Micich 2009-02-13 13:50:54 UTC
Added in svn r744253

New methods were added to Workbook interface

Some sample code:

InputStream is = new FileInputStream("HiddenTest.xls");
HSSFWorkbook wb = new HSSFWorkbook(is);
System.out.println("original hidden flag: " + wb.isHidden());
wb.setHidden(false);
OutputStream os = new FileOutputStream("NotHiddenNow.xls");
wb.write(os);
os.close();