Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow reading CSV directly and not from file #96

Open
tdauth opened this issue Dec 20, 2023 · 0 comments
Open

Allow reading CSV directly and not from file #96

tdauth opened this issue Dec 20, 2023 · 0 comments

Comments

@tdauth
Copy link

tdauth commented Dec 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant