Ignition 8.1: Excel Import & Export tool for Ignition Tags

Full disclosure: New to Ignition…

Looking for a method where by I can import/export Tags to/from Excel into Designer Tags. Initially was considering using Ignition itself as the “parser” to convert Tags (in JSON) to CSV for Excel and then converting CSVs back to JSON Tags for import into Ignition, but does not appear to be trivial.

I am sure many of you in the forum have probably gone through this hurdle before. Can any one share some tools/utilities that have worked.

Illustration of what I was considering, but would apply to any tool that could do the parsing:

Consider using a decent code editor to work with JSON or XML directly, with formatting and color coding and a decent search/replace feature (regular expression based). Instead of Excel. CSV and Excel are extremely handicapped with Ignition tags (and other resources) as many properties have variable-length subproperties that do not render in a strict row/column environment. It isn’t a question of “trivial”, but a question of “possible”.

Personally, I use Kate, from the KDE project.

Thanks Pturmel.

The challenge I have is our typical projects start with a Device/Motor list of tags that we then want to add the necessary properties and “tag paths” to and then import into an HMI (i.e. Ignition). This “Device/motor tag list” is typically given in an Excel spreadsheet, so that is my starting point. From this we would be exporting from Excel (in the correct target format either directly or through some post parsing process to generate the correct file format) the Tags for import into the HMI (i.e. Ignition).

I would think this is a common workflow for most integrators, so surprised that someone hasn’t developed a utility to do this (or at least at a basic level of common properties).

I made a (super ugly) Excel tool back in v7 that basically takes a text template and repeats it for the number of instances you define in a table, where each instance defines a set of parameters to replace place holder values in the template with. I have a header and footer that are added as well. It works with XML and now json, and any text templates really. It’s super handy for Bulk creation of udt instances. It’s not so great though if you’re trying to create individual tags. Most of my tags are inside udts though which I create by simply browsing the plc and dragging them into the data types area

I made a parser in Ignition that can take a preformatted CSV file and use the scripting functions in Ignition to create the tags. The only downside is I had to limit those variable-length subproperties pturmel talked about. As long as you are okay with doing that it is a good way to go about having a flexible import sheet from Excel.

As far as exporting from tags to JSON/CSV. Forget that. Just build windows within Ignition that can edit bulk tags. The scripts in Ignition make it fairly easy to change any configuration once that tag exists.

1 Like

VBA in Excel, old school but it’s your answer and overall more flexible across platforms. My Excel documents auto-generate tags for Ignition, ControLogix and more. Use UDTs in Ignition so the bulk of the work is done for you already, then it’s just about creating VBA that can write the XML (my preference) for all your tag instances to a file that you can import into Ignition.

Create 2 tags in Ignition as your point of reference, then export them and use it as your reference of what the VBA needs to generate.

Example: https://simpleexcelvba.com/how-to-create-xml-file-from-scratch/

Or, use xlrd or Apache POI to read the excel file and write the tags directly.

1 Like


hello sir, i tried copying the xlrd file, in user/lib and site packages
when i tried to run a scriptin in the designer. error shows no module name xlrd? how can i resolve that error?

  1. Did you unzip it?
  2. Did you put the unzipped folders into the gateway’s site-packages folder?
  3. Did you restart the designer?
  4. Did you try deleting the cache on your designer PC?


i have already installed and followed the above instructions

now i have this error below pops out

Traceback (most recent call last):
File “event:actionPerformed”, line 3, in
File “C:\Users\etigno.ignition\cache\gwlocalhost_8088\C0\pylib\site-packages\xlrd_init_.py”, line 110, in open_workbook
filename = os.path.expanduser(filename)
IOError: (2, ‘No such file or directory’, ‘myWorkbook.xlsx’)

It can’t find your file at the path you gave it. Without seeing your script, it’s difficult to say further.

It finally works now

i can now print the cell values on a sheet,

now working on, how to insert it to a dataset or directly to the database

1 Like