DsExcel Java provides users with the ability to modify table layout as per their choice.
Table Layout mode enables users to divide an area of a group into several rows and columns and then place controls into the cells by specifying the indexes and span values for rows and columns. This functionality is similar to the one which is used while creating a table in HTML.
In order to modify table layout in DsExcel Java, refer to the following example code.
Java |
Copy Code |
---|---|
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B2")); // Show table header row. table.setShowHeaders(true); // To make "first row stripe" and "second row stripe" table style element's // style effective. table.setShowTableStyleRowStripes(false); // Hide auto filter drop down button. table.setShowAutoFilterDropDown(false); // To make "first column" table style element's style effective. table.setShowTableStyleFirstColumn(true); // Show table total row. table.setShowTotals(true); // To make "last column" table style element's style effective. table.setShowTableStyleLastColumn(true); // To make "first column stripe" and "second column stripe" table style // element's style effective. table.setShowTableStyleColumnStripes(true); // Unfilter table column filters, and hide auto filter drop down button. table.setShowAutoFilter(false); |