Skip to content

Instantly share code, notes, and snippets.

@svierk
Last active October 23, 2022 15:09
Show Gist options
  • Save svierk/0983448e9ee33e3b6b24567f00a99d32 to your computer and use it in GitHub Desktop.
Save svierk/0983448e9ee33e3b6b24567f00a99d32 to your computer and use it in GitHub Desktop.
HTML Template for CSV Parser LWC
<template>
<lightning-card title="CSV To Datatable" icon-name="doctype:csv">
<div class="slds-p-around_medium">
<lightning-input
type="file"
label="Please upload a UTF-8 encoded, comma separated .csv file"
accept=".csv"
onchange={handleFileUpload}
>
</lightning-input>
</div>
<div style="height: 300px">
<lightning-datatable key-field="id" data={data} columns={columns} hide-checkbox-column> </lightning-datatable>
</div>
</lightning-card>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment