jxl.write.WritableWorkbook workbook = jxl.Workbook.createWorkbook(filename);
jxl.write.WritableSheet sheet = workbook.createSheet(tag,0);
jxl.SheetSettings settings = sheet.getSettings();
settings.setFitHeight(1); // 設定預覽列印與列印成為一頁, 高度
settings.setFitWidth(1); // 設定預覽列印與列印成為一頁, 寬度
settings.setOrientation(jxl.format.PageOrientation.LANDSCAPE);//橫印
settings.setFitToPages(true);
WritableCellFormat.setVerticalAlignment(jxl.format.VerticalAlignment.CENTRE);//垂直置中
WritableCellFormat.setAlignment(jxl.format.Alignment.CENTRE);//水平置中
沒有留言:
張貼留言