Skip to main content

IExportToExcelButtonProps

@spartanfx/react v1.2.2


@spartanfx/react / index / IExportToExcelButtonProps

Interface: IExportToExcelButtonProps

Props for the ExportToExcelButton component.

Properties​

Required​

PropertyTypeDescription
itemsIExportToExcelItemAn object containing datasets for each sheet to be exported.
schemaIExportToExcelSchemaA schema that defines the columns and labels for each Excel sheet.

Options​

PropertyTypeDescription
button?ElementOptional button element to replace the default export button.
buttonText?stringOptional text to display on the export button. Defaults to "Export To Excel".
directDownload?booleanIf true, hides the button and triggers a direct download.
fileName?stringOptional file name for the exported Excel file. Defaults to "download".
translatedFields?string[]List of field names that should be passed through the translate function.

Events & callbacks​

PropertyTypeDescription
translate?(key) => stringOptional translation function to localize field values.