SheetXL - v0.3.20
    Preparing search index...
    Index

    Constructors

    Methods

    • A string array of all the mimeTYpes. Used for the input accept attribute.

      Returns string[]

      • An array of strings for the input types.
    • Returns readonly ReadFormatType[]

    • Parameters

      • ext: string

      Returns ReadFormatType

    • Parameters

      • key: string

      Returns ReadFormatType

    • Parameters

      • mimeType: string

      Returns ReadFormatType

    • Imports a workbook from various source types with automatic detection.

      This method provides a unified interface for importing workbooks from different source types including files, base64 strings, fetch URLs, array buffers, and streams. The source type is automatically detected based on the input value.

      Parameters

      • options: ReadWorkbookOptions

        Optional import configuration and callbacks

      Returns Promise<WorkbookHandle>

      A promise that resolves to ImportResults containing the workbook, filename, and detected type

      When the source type cannot be detected

      When no appropriate import handler is available

      When the import operation fails

      Source type detection rules:

      • Objects with base64 property → base64 type
      • Objects with input property → fetch type (FetchArgs)
      • Strings starting with data: → base64 type
      • Strings starting with http:// or https:// → fetch type
      • Strings starting with /, ./, ../ → fetch type
      • Other strings → fetch type (default)
      • File objects → file type
      • ArrayBuffer/TypedArrays → buffer type
      • ReadableStream → stream type (converted to buffer)
      • Functions → resolved then re-detected
      • Promises → resolved then re-detected
    • Parameters

      • workbook: IWorkbook
      • key: string
      • Optionaloptions: WriteWorkbookOptions

      Returns Promise<ArrayBufferLike>

    • Exports to the local file system attempting to use the fileName provided. This will use the exportType to determine the export handler to use.

      Parameters

      • fileName: string
      • workbook: IWorkbook
      • Optionaloptions: WriteWorkbookOptions

      Returns Promise<boolean>

      a Promise indicating success or failure.