use of org.apache.poi.xssf.usermodel.XSSFSheet in project bamboobsc by billchen198318.
the class KpiPeriodTrendsExcelCommand method createExcel.
private String createExcel(Context context) throws Exception {
String fileName = SimpleUtils.getUUIDStr() + ".xlsx";
String fileFullPath = Constants.getWorkTmpDir() + "/" + fileName;
XSSFWorkbook wb = new XSSFWorkbook();
XSSFSheet sh = wb.createSheet();
this.putTables(wb, sh, context);
FileOutputStream out = new FileOutputStream(fileFullPath);
wb.write(out);
out.close();
wb = null;
File file = new File(fileFullPath);
String oid = UploadSupportUtils.create(Constants.getSystem(), UploadTypes.IS_TEMP, false, file, "kpis-period-trends.xlsx");
file = null;
return oid;
}
use of org.apache.poi.xssf.usermodel.XSSFSheet in project bamboobsc by billchen198318.
the class ObjectivesDashboardExcelCommand method createExcel.
private String createExcel(Context context) throws Exception {
String fileName = SimpleUtils.getUUIDStr() + ".xlsx";
String fileFullPath = Constants.getWorkTmpDir() + "/" + fileName;
XSSFWorkbook wb = new XSSFWorkbook();
XSSFSheet sh = wb.createSheet();
this.putCharts(wb, sh, context);
FileOutputStream out = new FileOutputStream(fileFullPath);
wb.write(out);
out.close();
wb = null;
File file = new File(fileFullPath);
String oid = UploadSupportUtils.create(Constants.getSystem(), UploadTypes.IS_TEMP, false, file, "objectives-dashboard.xlsx");
file = null;
return oid;
}
use of org.apache.poi.xssf.usermodel.XSSFSheet in project bamboobsc by billchen198318.
the class TimeSeriesAnalysisExcelCommand method createExcel.
private String createExcel(Context context) throws Exception {
String fileName = SimpleUtils.getUUIDStr() + ".xlsx";
String fileFullPath = Constants.getWorkTmpDir() + "/" + fileName;
XSSFWorkbook wb = new XSSFWorkbook();
XSSFSheet sh = wb.createSheet();
this.putTables(wb, sh, context);
FileOutputStream out = new FileOutputStream(fileFullPath);
wb.write(out);
out.close();
wb = null;
File file = new File(fileFullPath);
String oid = UploadSupportUtils.create(Constants.getSystem(), UploadTypes.IS_TEMP, false, file, "forecast-analysis.xlsx");
file = null;
return oid;
}
use of org.apache.poi.xssf.usermodel.XSSFSheet in project bamboobsc by billchen198318.
the class PerspectivesDashboardExcelCommand method createExcel.
private String createExcel(Context context) throws Exception {
String fileName = SimpleUtils.getUUIDStr() + ".xlsx";
String fileFullPath = Constants.getWorkTmpDir() + "/" + fileName;
XSSFWorkbook wb = new XSSFWorkbook();
XSSFSheet sh = wb.createSheet();
this.putCharts(wb, sh, context);
FileOutputStream out = new FileOutputStream(fileFullPath);
wb.write(out);
out.close();
wb = null;
File file = new File(fileFullPath);
String oid = UploadSupportUtils.create(Constants.getSystem(), UploadTypes.IS_TEMP, false, file, "perspectives-dashboard.xlsx");
file = null;
return oid;
}
use of org.apache.poi.xssf.usermodel.XSSFSheet in project chilo-producer by cccties.
the class AuthorReader method read.
public void read() {
try {
workBook = new XSSFWorkbook(new FileInputStream(filePath.toString()));
Iterator<XSSFSheet> sheetIte = workBook.iterator();
while (sheetIte.hasNext()) {
Sheet sheet = sheetIte.next();
Map<String, List<String>> map = readSheet(sheet);
object.put(sheet.getSheetName(), map);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
workBook.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Aggregations