▦K2 Advanced GridsDeveloper Portal / 0.23
Documentation / Data export

Native Excel export

Lesson 14 · Part B — Generate native XLSX workbooks with typed values, summaries, group subtotals and optional formatting directly from the loaded K2 data.

Before you begin

Complete Lesson 14 — CSV export. Use the same basic configuration, then switch between the following complete examples.

Basic Excel ↓ Conditional formatting ↓ Grouped export ↓ Data visualization ↓
Required after saving a configuration file

Replace REPLACE_WITH_YOUR_AREAITEMID, save as purchase-orders.config.js, increment configVersion in the Data Label and reload. No engine replacement is required.

1. Native workbook and data types

Select Excel (.xlsx), then download. The Data worksheet uses typed numeric and Boolean values where supported. Date and time values are converted when recognized; unrecognized values remain text. Number display precision is distinct from stored precision. The tested example displays two decimals while the formula bar retains 182387.0023. AutoFilter and frozen headers are native Excel features.

Native Data worksheet
Figure 135 · Native Data worksheet · Actual test capture
Numeric format and underlying precision
Figure 136 · Numeric format and underlying precision · Actual test capture
Native numeric AutoFilter
Figure 137 · Native numeric AutoFilter · Actual test capture

2. Summary worksheet

Enable Include summary. For all 250 records, Total Order Value is 29,401,126.09. Filter Department = Procurement and export filtered records: 32 records and 3,844,000.14 total. Summary calculations follow the selected export dataset. See Lesson 4 — Aggregation.

Summary for loaded records
Figure 138 · Summary for loaded records · Actual test capture
Summary for filtered Procurement records
Figure 139 · Summary for filtered Procurement records · Actual test capture

3. Conditional formatting

Load the formatted configuration. Export with Include formatting selected to transfer status background and font colors as cell styles. The browser badge shape is not reproduced as an Excel pill. Disable Include formatting and repeat to export without these colors. See Lesson 8.

Status badges in K2
Figure 140 · Status badges in K2 · Actual test capture
Status colors in Excel
Figure 141 · Status colors in Excel · Actual test capture
Export without optional formatting
Figure 142 · Export without optional formatting · Actual test capture

4. Groups and subtotals

Load the grouped configuration and group by Department and Status. Select Filtered records, Include summary, Include groups and subtotals, and Include formatting. The Data worksheet retains grouped record order; collapsed groups do not exclude matching records from a filtered export. The workbook includes separate Data, Summary and Groups sheets. See Lesson 11. The supplied capture confirms the Groups tab exists; its individual subtotal values have not been independently validated.

Two-level grouping in K2
Figure 143 · Two-level grouping in K2 · Actual test capture
Grouped export options
Figure 144 · Grouped export options · Actual test capture
Grouped Data worksheet with Groups tab present
Figure 145 · Grouped Data worksheet with Groups tab present · Actual test capture

5. Native data bars and color scales

Load the visualization configuration, which enables excel.nativeConditionalFormatting. Select Include formatting. Order Amount and Delivery Progress use native Excel data bars; Budget Variance uses a graded color scale. The rules can be inspected in Excel Conditional Formatting Rules Manager. See Lesson 9.

Combined visualization and status formatting in K2
Figure 146 · Combined visualization and status formatting in K2 · Actual test capture
Native Excel data bars and color scale
Figure 147 · Native Excel data bars and color scale · Actual test capture
Excel Rules Manager: graded color scale E2:E251
Figure 148 · Excel Rules Manager: graded color scale E2:E251 · Actual test capture
Rendering differences

Excel uses its own gradients and scale rendering; opacity and zero-length bars may differ from the browser. Native conditional formatting is opt-in in the example configurations. Static status colors are exported as cell formatting, not dynamic status rules.

6. Export from Cards

Switch to Cards and filter Status = Overdue. Export filtered records. The workbook remains tabular and includes the same matching dataset, not screenshots or card layouts. The diagnostic in Part A confirms 250 loaded, 50 filtered and 10 current-page records.

Overdue orders in Card View
Figure 149 · Overdue orders in Card View · Actual test capture
Excel export from Card View
Figure 150 · Excel export from Card View · Actual test capture

7. Limitations and final check

Export is client-side and limited to loaded data. Do not rely on hidden columns or export settings to enforce data access; apply authorization at the source. Excel may open downloaded files in Protected View according to organizational security policies. Validate results on your target environment before deployment. See the Disclaimer.

Congratulations — you have reached the final lesson. Mark both export articles complete to finish all 14 learning stages. The Developer Reference is a separate documentation workstream.

Enlarged screenshot