diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/CreateTable.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/CreateTable.java index 7e1d56ad000..6a150bc380d 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/CreateTable.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/CreateTable.java @@ -44,12 +44,12 @@ public static void main(String[] args) throws IOException { // Create XSSFTable table = sheet.createTable(reference); - table.setName("Test"); - table.setDisplayName("Test_Table"); + table.setName("Test"); //no spaces + table.setDisplayName("Test_Table"); //must be different than setName // For now, create the initial style in a low-level way table.getCTTable().addNewTableStyleInfo(); - table.getCTTable().getTableStyleInfo().setName("TableStyleMedium2"); + table.getCTTable().getTableStyleInfo().setName("TableStyleMedium2"); //no spaces // Style the table XSSFTableStyleInfo style = (XSSFTableStyleInfo) table.getStyle(); @@ -58,8 +58,6 @@ public static void main(String[] args) throws IOException { style.setShowRowStripes(true); style.setFirstColumn(false); style.setLastColumn(false); - style.setShowRowStripes(true); - style.setShowColumnStripes(true); // Set the values for the table XSSFRow row;