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

How to embed CSV file in HTML Javascript #91

Open
mosatary opened this issue Jan 5, 2023 · 0 comments
Open

How to embed CSV file in HTML Javascript #91

mosatary opened this issue Jan 5, 2023 · 0 comments

Comments

@mosatary
Copy link

mosatary commented Jan 5, 2023

I am getting error in Chrome as I am pointing to a csv file in local directory. I would like to include the csv file in the HTML file so i can also share the html file with others without sending a separate csv file. I am not a javascript developer, but I would like to know if is possible to include variable to embed all the csv file within html file, not the path to vsv file.
Can anyone help?
thanks.

<script> function format_link(link) { if (link) return "" + link + ""; else return ""; } CsvToHtmlTable.init({ csv_path: "data/Health Clinics in Chicago.csv", element: "table-container", allow_download: true, csv_options: { separator: ",", delimiter: '"' }, datatables_options: { paging: false }, custom_formatting: [ [4, format_link] ] }); </script>
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