Bug 20146 - [PATCH] for making "getWorkbook" method public in HSSFWorkbook.java
Summary: [PATCH] for making "getWorkbook" method public in HSSFWorkbook.java
Status: RESOLVED DUPLICATE of bug 34007
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal with 1 vote (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2003-05-22 12:38 UTC by Joji John
Modified: 2005-04-22 09:13 UTC (History)
1 user (show)

Patch file for the changes suggested in the bug 20146 (277 bytes, patch)
2003-05-22 12:41 UTC, Joji John
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joji John 2003-05-22 12:38:41 UTC
For Version 1.10.0, public being omitted from the method definition of 
getWorkbook() in HSSFWorkbook.java. This method is used to give access to the 
underlying Workbook and it's records, so is useful for some applications using 
the usermodel.
Comment 1 Joji John 2003-05-22 12:41:25 UTC
Created attachment 6455 [details]
Patch file for the changes suggested in the bug 20146
Comment 2 Andy Oliver 2003-05-22 17:21:06 UTC
If there is functionality NOT provided via the HSSFWorkbook, provide patches to
expose that functionality.  If you just need low level read access, use the
event model.  We very deliberately encapsulate this.  Just like you cant get the
raw bytes from the HttpServletRequest, you can't get the raw metal from
HSSFWorkbook.  In essence, work with us.
Comment 3 gwansung kim 2003-08-25 08:17:29 UTC
Comment 4 Robert Weir 2003-08-30 18:50:11 UTC
What we do with the Workbook is iterate over all the FormatRecords and call
setUnicode(true) on them.  Otherwise we're get garbage output when we have
sheets with DBCS's like Chinese.

I can see why we would want to promote that functionality up a level into the
user model. Any suggestions on how to expose this?  Perhaps a setUnicode
(boolean) in HSSFWorkbook that would apply to all contained formats? 
Comment 5 Avik Sengupta 2005-04-22 17:13:32 UTC
We'll do it as in bug 34007 , call setUnicode(true) on Format if the format
string contains DBCS. 
That should work for DBCS sheets? In any case, we dont want to expose workbook. 

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