Hello, i have tried to import a CSV file into the table but i have experienced ValueError.
This is the script on the button:
filepath= system.file.openFile(“csv”)
string= system.file.readFileAsString(filepath)
data = system.dataset.fromCSV(string)
even.source.parent.getComponent(‘Table’).data = data
This is the data i would like to import into the table
Weird, I copied the code I posed from ignition to the website, then i copied it from the website back into ignition and it screws up the single quote and double quotes.
Yeah, you need to put code in a code formatting block. Basically, three backquotes by themselves on a line above and again on a line below your code. Like so:
```
pasted code
```
Hello, I am using the script above.
My question is can I import the .csv file to the Table Row 1 instead of the header.
I am using the power table. The header data get replaced every time.
FYI, my csv file does not contain header name.
I do not want the data to overwrite my table header.