Skip to content

How to embed CSV file in HTML Javascript #91

@mosatary

Description

@mosatary

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>

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