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

XLSXFile reading from wrong sheet and doesn't handle equations #51

Closed
dBriantClaytex opened this issue Dec 20, 2024 · 7 comments
Closed
Assignees
Labels

Comments

@dBriantClaytex
Copy link

Hi,

I have been working with ExternData within Dymola attempting to read in an .xlsx file and have come across a couple of issues.

  • When reading from the first sheet it attempts to read from the second sheet, but in the correct location.
  • When it attempts to read from the second sheet, it causes an error as it's reading a very simple calculation (A3-A2) instead of providing the result of the calculation.

Both of these issues do not exist when converted to an xls, but using that format doesn't allow the data size that this project requires.

The attached model demonstrates the issue, with both the xlsx and the .mo files.
ExternDataXLSXBug.zip

Many thanks,
David

@dBriantClaytex
Copy link
Author

Hi,

Further tests reveal a different error occuring when using a brand new xlsx spreadsheet, but with the same content as previous post, tested within Dymola.

In this instance, the simulation freezes at initialisation if a correct file read is called, the example is attached.
XLSXFromScratchBug.zip

Many thanks,
David

@beutlich
Copy link
Contributor

Thanks for reporting. Need to debug (using Dymola )whats going on.

@beutlich
Copy link
Contributor

beutlich commented Dec 27, 2024

After checking the provided test cases I observed three issues:

  1. Access violation on destruction of the external object if "xl/sharedStrings.xml" is missing the XLSX file.
  2. Programming error on sheet name resolution.
  3. Unimplemented case of formula values.

All three issues could be fixed.

overtaker pushed a commit that referenced this issue Dec 27, 2024
overtaker pushed a commit that referenced this issue Dec 27, 2024
beutlich added a commit that referenced this issue Dec 27, 2024
beutlich added a commit that referenced this issue Dec 30, 2024
@beutlich beutlich added the bug label Dec 30, 2024
@beutlich beutlich self-assigned this Dec 30, 2024
@dBriantClaytex
Copy link
Author

Hi Both,

Thank you for the very fast response, I appreciate you looking at this.

Just to be clear, is it a problem with the .XLSX file examples I sent? As I am still experiencing the issues with the examples I sent after pulled the updated externData both on Dymola 2024x Refresh 1 and 2025.

Many thanks,
David

@dBriantClaytex
Copy link
Author

I am running in windows.

For clarity, the steps taken:

  • Cleared the Dymola working directory
  • Deleted the old externData files
  • Replaced with the extracted new ones
  • Checked that the files used when opening in Dymola are the correct ones (checked the new license agreement date 2025 and checked ED_XLSXFile.c line 368 for changes made in your latest commit)
  • Ran the attached examples and the same errors occured.

Apologies if I am missing a step to cause the new library to work

@modelica-3rdparty modelica-3rdparty deleted a comment from overtaker Jan 2, 2025
@beutlich
Copy link
Contributor

beutlich commented Jan 2, 2025

I did not yet update the new binaries, hence you observe the same old errors since the same old binaries are used.

For now, you can checkout the update-binaries branch where I just pushed the rebuilt Windows binaries.

@dBriantClaytex
Copy link
Author

Brilliant, Thank you, it now works as expected.

I really appreciate the very quick and great help.

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

No branches or pull requests

2 participants