ChemPal Documentation - v1.6.0
    Preparing search index...

    Module helpers/exportResults

    Export Types

    ExportGroup

    A parent product together with the variant rows that should render beneath it as collapsible Excel outline-level-1 subrows.

    ExportFilterSummary

    A single label/value pair describing one active filter, shown on the Summary sheet (e.g. { label: "Supplier", value: "Loudwolf, Onyxmet" }).

    ExportContext

    Everything buildResultsWorkbook needs to render both worksheets. Kept free of DOM/DB/table coupling so the builder is a pure, unit-testable function.

    Functions - Export Helpers

    downloadBlob

    Triggers a browser download of a Blob under the given filename using a transient object URL + anchor click (no downloads permission required). Works in the extension's document context.

    Functions - Other

    countExportRows

    Total row count (parents + variants) across all groups.

    buildResultsWorkbook

    Builds the two-sheet .xlsx workbook (Summary + Results) for a set of results and returns it as a downloadable Blob. The Results sheet freezes the header row and first column, colors the header light blue and the first column light grey, enables AutoFilter, hides columns not visible in the table, and renders variants as collapsible outline-level-1 subrows beneath their parent.

    Variables - Export Helpers

    XLSX_MIME_TYPE

    MIME type for the OOXML spreadsheet (.xlsx) format, used when wrapping the generated workbook buffer in a Blob.