SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface GetFormatsOptions

    Options for filtering and searching format types.

    All options are combined using AND logic. A format must match all specified criteria to be included.

    Searches across multiple fields (key, extensions, MIME type, tags, description) and includes formats where ANY field contains the search term.

    All other options are exact filters that must match precisely. A format must satisfy ALL specified filters to be included.

    // Search: Find formats containing "excel" anywhere
    getFormats({ search: 'excel' }); // Matches xlsx (in description), xml (in tags), etc.

    // Filter: Get only xlsx format
    getFormats({ ext: '.xlsx' }); // Exact match on extension

    // Combined: Search for "excel" AND spreadsheet tag
    getFormats({ search: 'excel', tags: 'spreadsheet' });

    // Multiple filters: xlsx extension AND spreadsheet tag
    getFormats({ ext: '.xlsx', tags: 'spreadsheet' });
    interface GetFormatsOptions {
        ext?: string;
        key?: string;
        mimeType?: string;
        search?: string;
        tags?: string | string[];
    }
    Index
    ext?: string

    Filter by exact file extension (e.g., '.xlsx', '.csv').

    • Include the dot prefix
    • Case-insensitive exact match
    • Use this when you know the exact extension you want
    // Get only XLSX formats
    getFormats({ ext: '.xlsx' });
    key?: string

    Filter by exact format key.

    • Case-insensitive exact match
    • The key is the unique identifier for each format (e.g., 'xlsx', 'csv', 'sxl')
    • Use this when you need to find a specific format by its identifier
    // Get the XLSX format
    getFormats({ key: 'xlsx' });
    mimeType?: string

    Filter by exact MIME type (e.g., 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet').

    • Case-sensitive exact match
    • Useful for matching HTTP Content-Type headers
    // Get format by MIME type
    getFormats({ mimeType: 'text/csv' });
    search?: string

    Case-insensitive partial search across multiple fields.

    Searches in: key, file extensions, MIME type, tags, and description. Returns formats where ANY field contains the search term (OR logic).

    Use this for user-facing search boxes or fuzzy matching.

    // Find all Excel-related formats
    getFormats({ search: 'excel' });

    // Find formats with "xml" anywhere
    getFormats({ search: 'xml' });
    tags?: string | string[]

    Filter by exact tags (e.g., 'spreadsheet', 'text').

    • Exact string match (case-sensitive)
    • If multiple tags are needed, pass an array
    • Returns formats that have ALL specified tags (AND logic)
    // Get formats tagged as 'spreadsheet'
    getFormats({ tags: 'spreadsheet' });

    // Get formats with both 'spreadsheet' and 'binary' tags
    getFormats({ tags: ['spreadsheet', 'binary'] });