Apache POI ライブラリを使用して Excel ファイルを作成しています。32767 行を超える Excel ファイルを作成した後、短いデータ型の torow パラメータが原因で showInPane を設定できません。変数として 32767 行を超える行を渡すと、エラーが発生します。
java.lang.IllegalArgumentException: row index may not be negative
at org.apache.poi.ss.util.CellReference.<init>(CellReference.java:133)
at org.apache.poi.ss.util.CellReference.<init>(CellReference.java:127)
at org.apache.poi.ss.util.CellReference.<init>(CellReference.java:119)
at org.apache.poi.xssf.usermodel.XSSFSheet.showInPane(XSSFSheet.java:2380)
torow オーバーライド short データ型の最大値を設定する方法はありますか?
Apache Javadoc の showInPane
void showInPane(short toprow, short leftcol)
Sets desktop window pane display area, when the file is first opened in a viewer.
Parameters:
toprow - the top row to show in desktop window pane
leftcol - the left column to show in desktop window pane
http://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Sheet.html