1. Java POI生成excel怎麼進行列印頁面設置
HSSFPrintSetup printSetup = sheet.getPrintSetup();
printSetup.setPaperSize(HSSFPrintSetup.A4_PAPERSIZE); // 紙張
sheet.setDisplayGridlines(false);
sheet.setPrintGridlines(false);
sheet.setMargin(HSSFSheet.TopMargin,( double ) 0.2 ); // 上邊距內
sheet.setMargin(HSSFSheet.BottomMargin,( double ) 0.2 ); // 下邊距
sheet.setMargin(HSSFSheet.LeftMargin,( double ) 0.2 ); // 左邊距
sheet.setMargin(HSSFSheet.RightMargin,( double ) 0.2 ); // 右邊容距