Skip to main content

When to Use This Feature

Use column visibility controls for exports when you need to:
  • Generate executive summaries without technical detail columns
  • Create print-friendly PDFs excluding formula or calculated columns
  • Export compliance documentation showing only required fields
  • Produce different views for different stakeholder audiences

Configure Saved Views for Export

The recommended approach is to create dedicated saved views that pre-configure which columns appear in exports.

1. Define Export Views in Configuration

Add export-specific views to your risksheet.json configuration:
"views": [
  {
    "name": "Full View",
    "columnIds": ["@all"]
  },
  {
    "name": "Executive Summary",
    "columnIds": [
      "item",
      "title",
      "severity",
      "occurrence",
      "rpn",
      "taskStatus"
    ]
  },
  {
    "name": "No Calculations",
    "columnIds": [
      "@all",
      "-rpn",
      "-rpnNew",
      "-detectionRating"
    ]
  }
]

2. Select View Before Exporting

  1. Open your Risksheet
  2. Use the View dropdown in the top panel
  3. Select your export-specific view (e.g., “Executive Summary”)
  4. Click Export to Excel or Export to PDF
  5. Switch back to “Full View” for continued editing
Formula columns must be visible when the sheet initially loads to calculate their values. If you hide formula columns using saved views, ensure the sheet loads with formulas visible first, then switch to the export view. The calculated values will persist even after hiding the columns.

Hide Columns Dynamically for PDF Export

For PDF exports, you can hide columns programmatically using custom export scripts without creating saved views.

Configure PDF Export Script

Attach a custom Velocity template named risksheetPdfExport.vm to your document:
<script>
// Hide specific columns during PDF export
var columnsToHide = "rpn,rpnNew,detectionRating";

// Export main grid with hidden columns
var exporter = new com.nextedy.risksheet.export.pdf.PdfExporter();
exporter.exportMainSheet(doc, customTableGridSettings, columnsToHide);

// Restore columns after export
// (automatic cleanup handled by exporter)
</script>
The columnsToHide parameter requires exact column binding names (the id or binding property from your configuration), not display headers. Check your risksheet.json to confirm binding names.

Comparison: Saved Views vs. Dynamic Hiding

MethodBest ForLimitations
Saved ViewsExcel exports, reusable views, user controlRequires view switching, no automation
PDF ScriptPDF exports, automated, no user actionPDF only, requires Velocity scripting
Select Visible ColumnsAd-hoc exports, one-time needsManual checkbox selection each time

Use Manual Column Selection

For one-time exports, use the built-in column visibility selector:
  1. Click Select Visible Table Columns in the top panel
  2. Uncheck columns you want to hide
  3. Click OK
  4. Perform your export
  5. Restore columns by reopening the selector and checking them again
Manual column visibility changes do not persist. The next time you open the Risksheet, all columns return to their default visibility state.

Common Patterns

Executive Dashboards

Hide implementation details, show only risk ratings and status:
{
  "name": "Executive Dashboard",
  "columnIds": [
    "item",
    "title",
    "severity",
    "occurrence",
    "rpn",
    "taskStatus",
    "mitigationOwner"
  ]
}

Compliance Documentation

Show all required fields, hide internal tracking columns:
{
  "name": "Compliance Export",
  "columnIds": [
    "@all",
    "-internalNotes",
    "-reviewerComments",
    "-developmentStatus"
  ]
}
Remove wide text columns that cause page breaks:
{
  "name": "Print Layout",
  "columnIds": [
    "@all",
    "-description",
    "-detailedAnalysis",
    "-mitigationPlan"
  ]
}

Verification

After configuring your export views:
  1. Select a saved view from the dropdown
  2. Verify that only the intended columns are visible
  3. Export to your target format (Excel or PDF)
  4. Open the exported file and confirm column visibility matches expectations
You should see only the columns defined in your view configuration, with all others hidden from the export output.

See Also

KB ArticlesSupport TicketsSource Code
  • ExportToPdf.ts
  • ToggleReviewCommand.ts
  • ResetColumnsCommand.ts
  • ExportToExcel.ts
  • ColumnsHelper.ts