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 ); // 右边距