Approach 1: Use Saved Views for Export-Specific Layouts
Saved views let you define column visibility presets that you can activate before exporting. This is the recommended approach for most workflows.Step 1: Define an Export View
Add a view entry to theviews array in your risksheet.json that hides the columns you do not want in the export:
Step 2: Switch to the Export View Before Exporting
- Open the Risksheet document
- Select the Export View from the saved views dropdown
- Click Export to Excel or Export to PDF
- After exporting, switch back to your default working view
Approach 2: Use hideColumns in PDF Export Scripts
For PDF exports, you can programmatically hide columns using thehideColumns parameter in your custom export script without changing the interactive view.
Step 1: Edit Your PDF Export Script
Open yourrisksheetPdfExport.vm template and call exportMainSheet with the hideColumns parameter:
hideColumns parameter accepts a comma-separated list of column binding names. The specified columns are temporarily hidden during export and automatically restored afterward.
Step 2: Identify Column Binding Names
Find thebinding value for each column you want to hide in your risksheet.json:
binding values (not header or id) in the hideColumns parameter.
Comparison: Saved Views vs. hideColumns
| Feature | Saved Views | hideColumns Parameter |
|---|---|---|
| Export type | Excel and PDF | PDF only |
| Configuration | risksheet.json | PDF export script |
| User action required | Switch view before export | None (automatic) |
| Formula impact | Hides column, stops formula execution | Temporarily hides during export only |
| Reusable across exports | Yes | Per-script basis |
Saving Personal Column Settings
You can also save personal column width and visibility preferences that persist across sessions:- Adjust column widths and visibility as needed
- Use the Save Columns command to persist your settings
- Your preferences are saved per-user and apply each time you open the document
Verification
After configuring column visibility for exports:- For saved views: switch to your export view, confirm the target columns are hidden, then export
- For
hideColumns: run the PDF export and open the generated file
See Also
- Control Column Visibility — Interactive column visibility settings
- Export to PDF — Base PDF export workflow
- Export to Excel — Excel export reference
- Customize PDF Export Scripts — Full PDF script customization
- Create Saved Views — Saved view configuration
Sources
Sources
KB ArticlesSupport TicketsSource Code
ExportToPdf.tsToggleReviewCommand.tsResetColumnsCommand.tsExportToExcel.tsColumnsHelper.ts