Hi,
I have generated with xlsx4j , but if I try to print it, Excel crashes and restarts. This is the Error message without information :
What did I do wrong?
Regards, Nadeo
<bookViews>
<workbookView xWindow="510" yWindow="510" windowWidth="11175" windowHeight="9915"/>
</bookViews>
SpreadsheetMLPackage pkg = SpreadsheetMLPackage.createPackage();
workBook = pkg.getWorkbookPart();
// OF = "ObjectFactory OF = Context.getsmlObjectFactory();"
Workbook wb = OF.createWorkbook();
BookViews bookview = OF.createBookViews();
CTBookView ctBookview = OF.createCTBookView();
ctBookview.setXWindow(510);
ctBookview.setYWindow(510);
ctBookview.setWindowWidth(11175L);
ctBookview.setWindowHeight(9915L);
bookview.getWorkbookView().add(ctBookview);
wb.setBookViews(bookview);
// without this, there will be an "nullPointerException" in :
// SpreadsheetMLPackage
// _____createWorksheetPart([...])
// _________sheets.getSheet().add(s); <<--sheets is null without the next line
wb.setSheets(OF.createSheets());
workBook.setJaxbElement(wb);
Users browsing this forum: No registered users and 6 guests