Skip to content

Exporting Data to Excel with RevoGrid Pro

Exporting your grid data to Excel is an essential feature for many applications, allowing users to share, analyze, or archive their data efficiently. RevoGrid Pro makes this process seamless with its ExportExcelPlugin

Writing Options

Here’s a breakdown of some of the key options available in the WritingOptions interface:

  • type: Specifies the output data encoding (e.g., 'base64', 'binary', 'buffer', etc.).
  • bookSST: Generates a Shared String Table, reducing file size for large text-based datasets.
  • bookType: Sets the file format of the generated workbook. Supported types include 'xlsx', 'xlsm', 'xlsb', 'xls', and more.
  • compression: Enables ZIP compression for supported formats, helping to reduce file size.
  • ignoreEC: Suppresses "number stored as text" errors, ensuring smoother data exports.

Example usage of WritingOptions:

typescript
const exportConfig: ExportExcelEvent = {
  sheetName: 'Property Data',
  workbookName: 'Properties.xlsx',
  writingOptions: {
    type: 'file',
    bookType: 'xlsx',
    compression: true,
    ignoreEC: true,
  },
};

Conclusion

Exporting data to Excel is a powerful feature that allows users to take their data offline, share it, or perform further analysis in Excel. With RevoGrid Pro and the ExportExcelPlugin, you can easily implement this functionality in your applications. By following these steps, you can customize the export process to fit your specific needs, ensuring your data is presented exactly as required.

Revogrid is a MIT-licensed open source library made by Revolist OU.