The developers list. [email protected] I've done so. Thanks for your report.
Sent from my iPhone On May 21, 2013, at 7:48 AM, Mathew Reny <[email protected]> wrote: > I don't need any help, errors happen, however this error explicitly told me > to email you guys. Below are the stack traces and source code that produced > the error. If you need anything else from me, email me back. > ----------------------------------------------------------------------------------------------------------------------- > Exception in thread "main" > org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Rule M2.4 > exception : this error should NEVER happen, if so please send a mail to the > developers team, thanks ! > at > org.apache.poi.openxml4j.opc.internal.ContentTypeManager.getContentType(ContentTypeManager.java:342) > at > org.apache.poi.openxml4j.opc.internal.ContentTypeManager.removeContentType(ContentTypeManager.java:255) > at > org.apache.poi.openxml4j.opc.OPCPackage.removePart(OPCPackage.java:919) > at > org.apache.poi.openxml4j.opc.PackagePart.getOutputStream(PackagePart.java:520) > at > org.apache.poi.xssf.usermodel.XSSFWorkbook.commit(XSSFWorkbook.java:1301) > at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:313) > at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:173) > at com.ashtonwoodshomes.OptionDumpMain.main(OptionDumpMain.java:38) > > ------------------------------------------------------------------------------------------------------------------------------------ > > import java.io.File; > import java.io.FileInputStream; > import java.io.FileNotFoundException; > import java.io.FileOutputStream; > import java.io.IOException; > import java.io.InputStream; > > import org.apache.poi.openxml4j.exceptions.InvalidFormatException; > import org.apache.poi.openxml4j.opc.OPCPackage; > import org.apache.poi.ss.usermodel.Cell; > import org.apache.poi.ss.usermodel.Row; > import org.apache.poi.ss.usermodel.Sheet; > import org.apache.poi.xssf.usermodel.XSSFWorkbook; > > public class OptionDumpMain { > > public static void main(String[] args) throws InvalidFormatException, > IOException{ > String filename = "thishasgraphs.xlsx"; > InputStream in = new FileInputStream(new File(filename)); > // XSSFWorkbook, InputStream, needs more memory > OPCPackage pkg = OPCPackage.open(in); > XSSFWorkbook wb = new XSSFWorkbook(pkg); > > Sheet appliances = wb.getSheet("Appliances"); > > Row firstRow = appliances.getRow(1); > Cell dataCellRow1 = firstRow.getCell(2); > System.out.println(dataCellRow1.getNumericCellValue()); > dataCellRow1.setCellValue(50); > > > > pkg.close(); > > FileOutputStream fileOut = new FileOutputStream("workbook.xls"); > wb.write(fileOut); > fileOut.close(); > } > } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
