Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to parse excel spreadsheet from scriptrunner


Hi All,   I am trying to pull data from an excel spreadsheet.   I have found several excel parsers for groovy that are based on apache poi which seem like what I need.

But I am having trouble just loading the libraries,  

I  tried using  grape to get this to resolve.

/*import groovy.grape.Grape
groovy.grape.Grape.grab(group:'org.apache.poi', module:'poi', version:'4.0')
groovy.grape.Grape.grab(group:'org.apache.poi', module:'poi-ooxml', version:'4.0')

@Grab(group='org.apache.poi', module='poi', version='4.0'),
@Grab(group='org.apache.poi', module='poi-ooxml', version='4.0')

import org.apache.poi.hssf.usermodel.*
import org.apache.poi.sssf.usermodel.*

InputStream inp = new FileInputStream("C:\\temp\\testFile.xlsx")
Workbook wb = WorkbookFactory.create(inp);

  Error grabbing Grapes -- [unresolved dependency: org.apache.poi#poi-ooxml;4.0: not found,unresolved dependency: org.apache.poi#poi;4.0: not found] j

Failed, on all saying that org.apache.poi was unresolved.

So I have downloaded the apache.poi jar files version 4.0 and placed the 6 jar files into web-inf/lib folder

Now I removed the grapes code and ran it and I get no errors on the import lines but it says it cannot resolve Workbook.  (Even if I scope it to

I tried doing import and that does fail.

But the documentation for java says that is where it is located.


I am running the above script from the Jira->Add ons->Script Console

Scriptrunner is 5.5.2

Jira 7.5.2


Any Ideas??



1 answer

0 votes
Vikrant Yadav Community Leader Sep 07, 2021

Hi @OToole  Kindly check below post for reading CSV file in Script Runner :-


Suggest an answer

Log in or Sign up to answer

Atlassian Community Events