Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error retrieving String value from XLSX sheet using Cell.asString if values are boolean #4

Closed
cameron-hurd opened this issue Jul 8, 2021 · 2 comments

Comments

@cameron-hurd
Copy link
Contributor

Attempting to retrieve a String value from an XLSX that has values like TRUE and FALSE throws the following:

java.lang.IllegalStateException: Cannot get a STRING value from a BOOLEAN cell

	at org.apache.poi.xssf.usermodel.XSSFCell.typeMismatch(XSSFCell.java:1077)
	at org.apache.poi.xssf.usermodel.XSSFCell.getRichStringCellValue(XSSFCell.java:395)
	at org.apache.poi.xssf.usermodel.XSSFCell.getRichStringCellValue(XSSFCell.java:71)
	at com.coreoz.windmill.imports.parsers.excel.ExcelCell.asString(ExcelCell.java:39)
	at com.coreoz.windmill.WindmillTest.parsingFunction(WindmillTest.java:232)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.SliceOps$1$1.accept(SliceOps.java:204)
	at java.util.stream.SliceOps$1$1.accept(SliceOps.java:204)
	at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
	at com.coreoz.windmill.WindmillTest.should_export_excel_data_starting_from_a_non_origin_point(WindmillTest.java:84)
@cameron-hurd
Copy link
Contributor Author

Please see fix PR - #5

@amanteaux
Copy link
Member

Many thanks for this issue and your PR !

This is fixed in version 1.2.1 : https://github.com/Coreoz/Windmill/releases/tag/1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants