Skip to content

Allow reading CSV directly and not from file #96

@tdauth

Description

@tdauth

Is your feature request related to a problem? Please describe.
I cannot load a CSV without a file but my data is from Thymleaf and hence in memory already.

Describe the solution you'd like
Something like this:

CsvToHtmlTable.init({
       //csv_path: 'data/Health Clinics in Chicago.csv',
      csv_data: [(${o.getCsv()})];
      element: 'table-container',
      allow_download: true,
      csv_options: {separator: ',', delimiter: '"'},
      datatables_options: {"paging": false}
});

where csv_data is simply a string with a CSV file.

Describe alternatives you've considered
Creating temporary files or providing URLs to download the CSV content again seems unnecessary.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions