[]
        
(Showing Draft Content)

Tables

Tables are essential to depict large amounts of data in an organized way. GcExcel supports using Excel tables in template layouts where various operations can also be performed on it like filtering, sorting etc.

This template example lists sales information for different areas grouped as a list. The template cells are defined within the table layout.

The below image displays a template layout where a table is used and template cells are defined inside the table. You can also download the Excel template layout from here.

TemplateWorkWithTable[Template].xlsx

Excel template layout displaying template cells inside a table


After GcExcel processes the template layout, the Excel report will look like below:

Excel report displaying generated data inside a table


An Excel table can be incorporated in a template layout in two ways:

  1. Template cells inside an Excel table: You can insert a table in Excel's template layout and define template cells inside it, as shown in above screenshot. The table is resized according to the expanded data after processing the template in GcExcel.

  2. Excel table inside a template cell’s range: You can define a template cell with Range property and insert a table anywhere within that range. The table is copied according to the expansion data after processing the template in GcExcel.

Note: Table formulas are also supported in template cells.

Limitations

  • In GcExcel Templates, the default group type is "Merge", which is not supported in case of tables. Hence, you should explicitly set the group type to any other value except "Merge".

  • Excel table inside a template cell’s range: The complete range of table should be included in the template cell’s Range property. For example, if a table occurs in the range C5:D8, the template cell should have the "Range(R)" property, for example: {{ds.Area(R=C5:D8)}}, to include table inside cell range C5:D8.However, for sheet name template, any table in the current sheet is included by default. So, it doesn't need to set "Range" property.

  • Template cells inside an Excel table: If sheet name template is also used along with table, there might be layout issues while expanding the template and the table might be moved to an incorrect location. Hence, you should convert table to cell range before processing.