Skip to content

jx:table

jx:table creates a proper Excel structured table (ListObject) over the output range. You get auto-filter headers, banded row styling, total rows, and named table references — all without writing a line of styling code.

jx:table(lastCell="D1" name="EmployeeTable" style="TableStyleMedium9")
jx:table(lastCell="D1" name="SalesData" style="TableStyleLight1" showHeaderRow="true" showTotalRow="true")
AttributeRequiredDescription
lastCellYesBottom-right cell of the table area
nameYesTable name (must be unique in the workbook, no spaces)
styleNoExcel table style name (default: TableStyleMedium9)
showHeaderRowNoShow the header row with filter dropdowns (default: true)
showTotalRowNoAdd a total row at the bottom (default: false)
showFirstColumnNoHighlight the first column (default: false)
showLastColumnNoHighlight the last column (default: false)
showRowStripesNoEnable banded row shading (default: true)
showColumnStripesNoEnable banded column shading (default: false)

Use it when your output needs to behave like a real Excel table, not just formatted cells:

  • Auto-filter dropdowns on every column header
  • Structured references in formulas (e.g., =SUM(SalesData[Amount]))
  • Banded row styling that adapts as rows are added/removed
  • Total rows with built-in aggregate functions
  • Named table references for pivot tables and Power Query
Cell A1 comment:
jx:area(lastCell="D10")
jx:each(items="employees" var="e" lastCell="D1")
Cell A1 also has:
jx:table(lastCell="D1" name="Employees" style="TableStyleMedium2")

Cell values: ${e.Name} | ${e.Department} | ${e.Title} | ${e.Salary}

The output is a fully functional Excel table. Users can click any column header to filter or sort — no macros, no VBA.

Cell A1 comment:
jx:table(lastCell="C1" name="MonthlySales" style="TableStyleMedium9" showTotalRow="true")

With showTotalRow="true", Excel adds a total row at the bottom of the table. Users can click each cell in the total row to choose an aggregate function (Sum, Average, Count, etc.).

Excel ships with 60+ built-in table styles. Common ones:

StyleAppearance
TableStyleLight1 through TableStyleLight21Subtle, professional
TableStyleMedium1 through TableStyleMedium28Balanced color and structure
TableStyleDark1 through TableStyleDark11Bold, high-contrast

Pick a style in Excel’s table design ribbon, note its name, use it in the style attribute.

jx:table uses deferred execution. The table definition is collected during processing and applied after all rows are written — ensuring the table range covers the correct number of output rows.

Add visual data indicators with conditional formatting:

jx:conditionalFormat →