The error message when compile is although all necessary jars set : class file for org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor not found new XSSFColor(new java.awt.Color(128, 0, 128));
Check your classpath and make sure ooxml-schemas-1.0.jar is included. Use the code below to see the actual path to the jar: System.out.println( org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor.class.getProtectionDomain().getCodeSource().getLocation()); On my machine it prints the following line: file:/D:/java/apache/jakarta-poi/poi/trunk/ooxml-lib/ooxml-schemas-1.0.jar Yegor