# Import XLS\\Import XLS. plugin xldr

**URL:** <https://forum.inductiveautomation.com/t/import-xls-import-xls-plugin-xldr/74851>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [June 9, 2023, 5:43pm UTC](https://forum.inductiveautomation.com/t/import-xls-import-xls-plugin-xldr/74851 "2023-06-09T17:43:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arielking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arielking/32/32412_2.png) [@arielking](https://forum.inductiveautomation.com/u/arielking)\
**Post date:** [June 9, 2023, 5:43pm UTC](https://forum.inductiveautomation.com/t/import-xls-import-xls-plugin-xldr/74851/1 "2023-06-09T17:43:40Z")

</div>

plugin python, xldr

code:

import xlrd  
file = system.file.openFile()  
if file != None:  
try:  
book = xlrd.open\_workbook(file,encoding\_override="cp1251")  
except:  
book = xlrd.open\_workbook(file)

```
worksheet = book.sheet_by_index(0)

rows=[]
for i in range(1,1000):
	
	try:
		linea=worksheet.cell(i,0).value 
		PuestoTrabajo=worksheet.cell(i,1).value
		
		oneRow = [linea,PuestoTrabajo]	
		rows.append(oneRow)
		
		print linea
		
	except:
		fila=i-1
		print 'Cantidad de filas importadas',' ',fila  
		break
headers = ["Linea" , " Puesto Trabajo"]
		
data = system.dataset.toDataSet(headers, rows)
	
table = event.source.parent.getComponent('tb_dataPamco')
table.data = data

```

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/3/032951a5ed292c48034163b9e5f137de07b6d865.png)

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [June 9, 2023, 5:55pm UTC](https://forum.inductiveautomation.com/t/import-xls-import-xls-plugin-xldr/74851/2 "2023-06-09T17:55:57Z")

</div>

I don't see a specific question, but I think good general advice is to use the Apache POI library to manipulate import/export/manipulate data in Excel files.

A forum post on the issue:

> [@Issue loading external python library like xlsxwriter](https://forum.inductiveautomation.com/t/issue-loading-external-python-library-like-xlsxwriter/39746/3):
>
> Consider using the [Apache POI](https://poi.apache.org/) Java library that is distributed with Ignition. Ignition v8.0.14 has Apache POI v4.1.1 built-in. As a native java library it will run faster than any python library, and you don’t have to install anything.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 9, 2023, 6:39pm UTC](https://forum.inductiveautomation.com/t/import-xls-import-xls-plugin-xldr/74851/3 "2023-06-09T18:39:43Z")

</div>

Except this post is flagged as 7.9 and I'm not sure that the Apache POI library was distributed with any 7.9 build. I would still probably opt for using Apache if I had it available though.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [June 9, 2023, 6:42pm UTC](https://forum.inductiveautomation.com/t/import-xls-import-xls-plugin-xldr/74851/4 "2023-06-09T18:42:18Z")

</div>

Good point. I didn't catch that.

If 7.9 doesn't include them, you can still put the .jar files in the `lib/core/common` folder yourself, but it isn't as seamless.
