After reading and trying different solutions from the forum I am unable to do the following:
- I have an Excel file (with only one sheet) I want to read using an external python library (i.e. xlrd) and write the contents of that sheet into a dataset memory tag.
I have tried with this example and some other posts on the forum: Microsoft excel 2010 - #2 by bkarabinchak.psi
Ignition 8.1: Excel Import & Export tool for Ignition Tags - #8 by pturmel
I copied the xlrd folder under both the “\user-lib\pylib\site-packages” and “\user-lib\pylib”:
I have a perspective view with a button and a label and the code is:
location = “C:\Users\GENIOTIC\Desktop\PruebasIgnition\PruebaExcel.xls”
book = xlrd.open_workbook(location)
self.getSibling(“Label”).props.text = book.nsheets
Ignition version is 8.1.
Could anyone give me a tip here? I already tried clearing the cache and restarting the gateway.
In the newer versions of xlrd, it is possible to read “.xlsx” files?
Thanks in advance,