Bug 34761

Summary: No API call available to set the top row for a sheet
Product: POI Reporter: Amol Deshmukh <amolweb>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Patch for 34761

Description Amol Deshmukh 2005-05-05 16:27:53 UTC
Currently, there is no API call availabe in the usermodel to allow setting the
"top row" on a sheet. The "top row" is the row that is visible when the sheet is
first viewed (controls the default view region of a sheet). The underlying Sheet
class in model stores a reference to the WindowTwo object that stores this info,
but it is not exposed in the usermodel (There should be a call in HSSFSheet
class that allows use to set the top row).
Comment 1 Amol Deshmukh 2005-05-05 16:31:11 UTC
Created attachment 14942 [details]
Patch for 34761

The attachment is a patch that adds methods to expose the WindowTwo.toprow
element of a sheet to the user thru the usermodel api call
xxx.usermodel.HSSFSheet.getTopRow() and setTopRow(). To enable this, getTopRow
and setTopRow were also added to xxx.model.Sheet class.
An elementary test case is provided and the results of the api call were
verified manually. 

However more automated tests would be required to really test this patch well!
Comment 2 Avik Sengupta 2005-05-07 18:57:25 UTC
Checked in, thanks. Used a slightly different API, thanks to Li Jiangmin