-
Notifications
You must be signed in to change notification settings - Fork 147
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
Reading a table from an excel file with format("excel") throws IOException in the 0.15.1 version #480
Comments
Spark version: 3.1.2 and 3.2.0 with java 11. Version: 0.14.0 is working. com.crealytics:spark-excel_2.12:0.14.0 |
Hi @cristichircu, in PR #562 I came across a multi thread issue with the code change you provided. I have a fix for this thread issue and two ways of doing it (see comment #562 (comment)). |
Hey @christianknoepfle! No, we don't need to do it every time. Once is ehough. I just couldn't figure out a better place to put it so it would get called once. Thanks for looking into this! |
Hi @cristichircu , thanks for the quick feedback. registerProviders() is now called only once. I moved the function call from getWorkbook() to ExcelHelper.apply() (and made the ctor of ExcelHelper private) just in case someone comes up with another method in ExcelHelper for getting the workbook and forgets about the initialization |
Previously working code for reading an excel file with the v2 format is failing after upgrading the library from 0.14.0 to the 0.15.1 version.
Expected Behavior
Reading with the format("excel") still works as with previous versions.
Current Behavior
Reading my excel file works for the format("com.crealytics.spark.excel") but with the format("excel") fails with the exception:
Possible Solution
The issue seems similar to the one fixed in the 0.15.1 version where some providers were added in WorkbookReader.
Steps to Reproduce (for bugs)
I'm reading my file similar to this:
Context
The issue was discovered trying to upgrade the library to the latest version.
Your Environment
The text was updated successfully, but these errors were encountered: