[英]Excel sheet not shifting more than a limited rows
我在“工作表”變量中有一個excel模板。 如圖所示,我需要將數據庫值添加到新行中。 我使用apache poi中的函數來編輯excel文件。
sheet.shiftRows(RowId, sheet.getLastRowNum(), Rows);
但這不會增加超過16行。 最初似乎pageheight為1,所以它不能超過一頁,但是即使使用
sheet.getPrintSetup().setFitHeight((short)9);
出現相同的錯誤。 知道為什么會這樣嗎?
shiftRows函數的參數為15、25、12
HSSFPrintSetup printSetup = sheet.getPrintSetup();
sheet.getPrintSetup().setFitWidth((short) 1);
sheet.getPrintSetup().setFitHeight((short) 0);
sheet.setAutobreaks(true);
printSetup.setLandscape(true);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.