# Reading Excel data into Ignition

**URL:** <https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447>\
**Category:** General Discussion\
**Created:** [April 9, 2021, 7:35pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447 "2021-04-09T19:35:21Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![stever](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@stever](https://forum.inductiveautomation.com/u/stever)\
**Post date:** [April 9, 2021, 7:35pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/1 "2021-04-09T19:35:21Z")

</div>

I am looking at importing data from an old Excel-based Tracking system into Ignition.  
the solution has to read Excel files in native format, preferably while the the spreadsheet is open on another computer if possible, because I need to leave the old system in place and running as I migrate to my new system over time.  
I have seen several topics similar to this on this forum (reading Excel Data), but the resolutions are not good for me.(exporting to a CSV file, adding a new module, or building one of my own using the SDK)  
I think I should be able to use the python module “pylightxl” but I don’t seem to be able to get that to work in side of Ignition Scripting.  
any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 10, 2021, 12:05am UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/2 "2021-04-10T00:05:45Z")

</div>

Using Apache POI, which is now bundled with Ignition.

> [@Copying an Excel file to a table's dataset](http://forum.inductiveautomation.com/t/copying-a-excel-file-to-a-tables-dataset/34942/13):
>
> Got my paperwork done early, so here's a sample to read from an Excel file EDIT: Reworked a bit to work with both .xls and .xlsx files EDIT: Modified to properly cast data types EDIT: Added handler for formula cell types EDIT: Added parameters to optionally specify sheet, row, and column numbers Reading back a file created from my other example: def excelToDataSet(fileName, hasHeaders = False, sheetNum = 0, firstRow = None, lastRow = None, firstCol = None, lastCol = None): import org.apac…

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [September 9, 2021, 10:52am UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/3 "2021-09-09T10:52:39Z")

</div>

Hi, looks like ‘‘util.printDataSet.’’ is probably a user custom script called into the code? Looking to do the same thing, I want to import data from a excel ‘’.xls’’ or ‘‘xlsx’’.  
Thanks for your help!!

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 9, 2021, 11:34am UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/4 "2021-09-09T11:34:06Z")

</div>

That thread also links to the printDataset function, but has nothing to do with making the dataset itself. 😉

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [September 9, 2021, 12:35pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/5 "2021-09-09T12:35:35Z")

</div>

Hi!  
Thanks found everything! Wasn’t able to see the whole thread. 😅

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [September 9, 2021, 1:09pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/6 "2021-09-09T13:09:06Z")

</div>

Hey Jordan, I’m stuck on this error. Are you able tell what i’m doing wrong?

 ![error](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/1/b17298a429baea44cd0c0726a8b8fccf69c60b6d.jpeg)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [September 9, 2021, 2:33pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/7 "2021-09-09T14:33:02Z")

</div>

The cell you are trying to get data on is returning None (null in Python-ese)

---

<div class="post-metadata">

**Author:** ![c.turmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/c.turmel/32/67745_2.png) [@c.turmel](https://forum.inductiveautomation.com/u/c.turmel)\
**Post date:** [September 9, 2021, 3:45pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/8 "2021-09-09T15:45:09Z")

</div>

Figured it out thanls!

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [September 27, 2022, 11:21am UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/10 "2022-09-27T11:21:28Z")

</div>

@Maxim_Drentom  
Are you trying to import information from Google sheets into a database, or are you trying to write data to Google sheets from ignition using a database as an intermediary?

---

<div class="post-metadata">

**Author:** ![Divya\_Chorge](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@Divya\_Chorge](https://forum.inductiveautomation.com/u/Divya_Chorge)\
**Post date:** [November 7, 2022, 12:25pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/11 "2022-11-07T12:25:02Z")

</div>

Hi c.turmel  
I am facing the similar issue that you posted AttritubuteError:'NoneType' object has no attribute 'getCellType'.  
Can you please suggest how did you figured it out.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [November 7, 2022, 2:56pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/12 "2022-11-07T14:56:36Z")

</div>

You will need to handle a null in the code. The error will tell you what line the issue is on. One suggestion is only allow the code to execute if the value is not null.

---

<div class="post-metadata">

**Author:** ![Priyanka.Khandge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/priyanka.khandge/32/35989_2.png) [@Priyanka.Khandge](https://forum.inductiveautomation.com/u/Priyanka.Khandge)\
**Post date:** [March 25, 2023, 2:34pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/13 "2023-03-25T14:34:28Z")

</div>

@Divya_Chorge How to fix this issue. I'm facing the same issue.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [March 25, 2023, 2:37pm UTC](https://forum.inductiveautomation.com/t/reading-excel-data-into-ignition/45447/14 "2023-03-25T14:37:16Z")

</div>

> [@Import excel to power table in vision](https://forum.inductiveautomation.com/t/import-excel-to-power-table-in-vision/71590/2):
>
> Try this one, it's essentially the same with a few minor changes, specifically to handle empty cells, which appears is what you have based on the error you got. def excelToDataSet(fileName, hasHeaders = False, forceString = False, sheetNum = 0, firstRow = None, lastRow = None, firstCol = None, lastCol = None): import org.apache.poi.ss.usermodel.WorkbookFactory as WorkbookFactory import org.apache.poi.ss.usermodel.DateUtil as DateUtil from java.io import FileInputStream from java.util impor…
