Forum Discussion
Yeah.. actually, you need to keep it in bin/ext folder.. please try again.
It did not work by placing jar file in ext folder. We have added jars files in soap/bin/ext folder for us. We are using SOAP 5.5.0. Thanks
activation-1.1.1
commons-codec-1.12
commons-collections4-4.3
commons-compress-1.18
commons-logging-1.2
commons-math3-3.6.1
curvesapi-1.06
jaxb-api-2.3.0
jaxb-core-2.3.0.1
jaxb-impl-2.3.0.1
junit-4.12
log4j-1.2.17
ooxml-schemas-1.4
poi-4.1.0
poi-examples-4.1.0
poi-excelant-4.1.0
poi-ooxml-4.1.0
poi-scratchpad-4.1.0
xmlbeans-3.1.0
- avidCoder5 years agoSuper Contributor
Here is my solution for this problem. Please go through this and try once more please. Remove al the jars form bin/ext folder and add whatever is mentioned in the problem:-
- mk1075 years agoOccasional Contributor
Thanks, Yes this work. We use jlx jars for reading from xls file. So csv and XLS are covered.
We want to read xlsx data using Apache POI using groovy scripting. Any solution for it.
- JHunt5 years agoCommunity Hero
Hi,
Your script works ok in the GroovyConsole with my own xlsx file.
@Grab(group='org.apache.poi', module='poi-ooxml', version='4.1.0') import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; import org.apache.poi.ss.usermodel.CellStyle; FileInputStream inputStream = new FileInputStream("C:/Users/hunti/My Lesson Plan.xlsx") Workbook wb = WorkbookFactory.create(inputStream) Sheet sheet1 = wb.getSheet("Sheet1") int rows = sheet1.getLastRowNum(); println rows //12
Can you post as an attachment the xlsx file you are having trouble with, or just let me know if you have the same problem with an empty/test sheet.
Posting more of the stack trace (as an attachment, please) may also help.
Related Content
- 13 years agojitendra_1
- 6 years agosriram_sig
- 10 years agomrezahoseini
Recent Discussions
- 5 days agosmilnik