public Struct getSummaryInfo() {
Struct infostruct = new StructImpl();
int sheets = workbook.getNumberOfSheets();
infostruct.setEL("SHEETS", new Double(sheets));
if(sheets>0) {
StringBuilder sb=new StringBuilder();
for(int i=0; i<sheets; i++){
if(i>0)sb.append(',');
sb.append(workbook.getSheetName(i));
}
infostruct.setEL("SHEETNAMES", sb.toString());
}
if(xmlFormat==FORMAT_HSSF) {
infostruct.setEL("SPREADSHEETTYPE", "Excel");
HSSFWorkbook hssfworkbook = (HSSFWorkbook)workbook;
info(infostruct,hssfworkbook.getSummaryInformation());
info(infostruct,hssfworkbook.getDocumentSummaryInformation());
}
else if(xmlFormat==FORMAT_XSSF) {
infostruct.put("SPREADSHEETTYPE", "Excel (2007)");
XSSFWorkbook xssfworkbook = (XSSFWorkbook)workbook;
POIXMLProperties props = xssfworkbook.getProperties();
info(infostruct,props.getCoreProperties().getUnderlyingProperties());
info(infostruct,props.getExtendedProperties().getUnderlyingProperties());