# Apache.poi.hssf access from script console for excel import

**URL:** <https://forum.inductiveautomation.com/t/apache-poi-hssf-access-from-script-console-for-excel-import/59893>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [May 23, 2022, 6:58am UTC](https://forum.inductiveautomation.com/t/apache-poi-hssf-access-from-script-console-for-excel-import/59893 "2022-05-23T06:58:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [May 23, 2022, 12:58pm UTC](https://forum.inductiveautomation.com/t/apache-poi-hssf-access-from-script-console-for-excel-import/59893/3 "2022-05-23T12:58:42Z")

</div>

> [@Copying an Excel file to a table's dataset](https://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…

---

_[View the full topic](https://forum.inductiveautomation.com/t/apache-poi-hssf-access-from-script-console-for-excel-import/59893)._
