A Polymer element to preview csv data and structured data (array of map) in table format
Install using Bower:
bower install csv-preview
- Import Polyfill Web Components support for older browsers:
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
- Import Custom Element:
<link rel="import" href="bower_components/csv-preview/csv-preview.html">
-
Start using it!(need to pass raw csv data somehow into element. Investigate index.html to see exmple)
-
If column separator of csv data is not comma, pass it in
separator
attribute. Theseparator
attribute is not required, you may remove it if column delimeter is comma (by default)
<csv-preview data="" separator=""></csv-preview>
Attribute | Options | Default | Description |
---|---|---|---|
data |
string | `` | raw csv data (comma delimied by default) |
separator |
string | , |
column separator (",", ";", etc) |
npm install -g web-component-tester
wct