# Copying an Excel file to a table's dataset

**URL:** <https://forum.inductiveautomation.com/t/copying-an-excel-file-to-a-tables-dataset/34942>\
**Category:** Ignition\
**Created:** [May 21, 2020, 3:38pm UTC](https://forum.inductiveautomation.com/t/copying-an-excel-file-to-a-tables-dataset/34942 "2020-05-21T15:38:18Z")\
**Posts on this page:** 1\
**Showing post:** 36

<div class="post-metadata">

**Author:** ![Ryan\_Shaw](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Ryan\_Shaw](https://forum.inductiveautomation.com/u/Ryan_Shaw)\
**Post date:** [January 13, 2022, 3:00pm UTC](https://forum.inductiveautomation.com/t/copying-an-excel-file-to-a-tables-dataset/34942/36 "2022-01-13T15:00:50Z")

</div>

I was getting the error, “TypeError: Unable to convert row x, column y to type class java.lang.Integer” on the line “return system.dataset.toDataSet(headers, data)”, which was traced to

value = cell.getNumericCellValue()  
if value == int(value):  
value = int(value)

The value it was referring to was a single float within a column of mostly integers

I fixed this error following the logic in ["Cannot convert row x column y to type java.lang.Long"](https://forum.inductiveautomation.com/t/cannot-convert-row-x-column-y-to-type-java-lang-long/34175) by adding

try:  
value = float(value)  
except:  
pass

just before rowOut.append(value). I will update this if I run into problems downstream due to this change.

---

_[View the full topic](https://forum.inductiveautomation.com/t/copying-an-excel-file-to-a-tables-dataset/34942)._
