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

Invalid File Format #316

Closed
SofiaMp opened this issue Nov 3, 2021 · 6 comments · Fixed by #319 or #320
Closed

Invalid File Format #316

SofiaMp opened this issue Nov 3, 2021 · 6 comments · Fixed by #319 or #320
Labels
bug Rabbit-In-A-Hat Issue concerning the specification of mapping rules

Comments

@SofiaMp
Copy link

SofiaMp commented Nov 3, 2021

When trying to open scan report of a newly generated scan report RiaH gives error Invalid File Format. However works when opening older scan reports.

Steps followed:

  1. Use White Rabbit to generate a scan report of a few Synthea tables, reading from csv files
  2. Open scan report generated with RiaH

Working with WhiteRabbit_v0.10.4 on MacOS 11.5.2
Both old and new scan report have extension .xlsx and don't appear to have any visual differences.

@SofiaMp SofiaMp added the bug label Nov 3, 2021
@MaximMoinat
Copy link
Collaborator

The issue also happens in v0.10.5.

The error happens when RiaH tries to get the first sheet from the scan report (line 150). It fails to get the overview sheet either by name or by position. It seems like the xlsx reader cannot retrieve any sheets from the workbook.

// Field overview is the first sheet
Sheet overviewSheet = workbook.getByName(ScanSheetName.FIELD_OVERVIEW);
if (overviewSheet == null) {
overviewSheet = workbook.get(0);
}

@ChanchalDixit-Cognizant

Hello,

Can you please let me know if this is resolved. Need to use this.
Thanks.

@PYDuquesnoy
Copy link

As a workaround, you can open the ScanReport.xlsx in Excel, and save it. After this operation, rabbitInaHat can process the file correctly.

@ChanchalDixit-Cognizant

Wow, It worked. Thank you @PYDuquesnoy .

@MaximMoinat
Copy link
Collaborator

Thanks @PYDuquesnoy for providing this workaround. We are looking into the issue at the moment.

@MaximMoinat
Copy link
Collaborator

MaximMoinat commented Nov 26, 2021

Initial inspection shows that somehow the scanreport produced with release v0.10.4 and v0.10.5, cannot be read in correctly by the excel reader. The xml files are somehow not found. Scanreports created with older releases of WR can still be read in by the new release.

There seems to be an issue with the writing of Excel files with the new apache poi dependencies.

@MaximMoinat MaximMoinat linked a pull request Nov 26, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Rabbit-In-A-Hat Issue concerning the specification of mapping rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants