Export
Save rows as CSV, Excel, Word, PDF, JSON, HTML or Markdown, copy them as a table or print them — written by the kit itself, no third-party library. One icon button per format, or one "Export" button with a menu; both take the same fields, data and options.
Basic
An icon button with a translated tooltip saves data as members.csv. fields picks the columns and their titles; a number field gets the row number.
Formats
Every format from the same setup: Excel keeps numbers, dates and booleans typed; Word and PDF are paged documents with the title, the date and page numbers (the PDF embeds only the glyphs it uses, Cyrillic included); JSON, HTML and Markdown are text files; Copy table puts it on the clipboard so it pastes into a spreadsheet by columns; Print opens the browser print dialog.
Columns
Each field can set width (characters, in every format), align, type and an Excel format; field can be a path (author.name), aggregator converts the value, place numbers the rows, and formats keeps a column only in some formats — the internal note is in Excel, CSV and JSON, not in the documents.
Excel
Excel options: sheet name, number and date formats (a field format wins over them), header colour and weight, frozen header, filter buttons and column widths from the content (or from width, between minWidth and maxWidth).
Documents
PDF, Word and print share the page setup: size, orientation (auto turns landscape above five columns), font size, title, subtitle and date, page numbers, stripes and lines. The header row repeats on every page.
Server
fetchData loads the rows on click — every page from the server — while the button spins and ignores more clicks. Returning null cancels the export.
Events
exported tells the format, the file name and how many rows went out; failed fires when fetchData or the writer throws, and the next click starts again.
Defaults
provideTxExport() sets defaults for the whole app (in app.config.ts) or for one component and its children, as here: semicolon CSV, Excel formats and colours, Letter pages. options on a button still wins.
Pass through
pt.button styles the inner button — here a wider pill.