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

Chart pages cause discrepancies in page names #63

Open
bmck opened this issue Sep 13, 2024 · 0 comments
Open

Chart pages cause discrepancies in page names #63

bmck opened this issue Sep 13, 2024 · 0 comments

Comments

@bmck
Copy link

bmck commented Sep 13, 2024

Consider a workbook that contains a "chart page" (described at https://support.microsoft.com/en-us/office/print-a-chart-on-a-full-page-581d7656-fdb7-4532-8e17-238d5879962e). An example can be found attached, named GDPTrackingModelDataAndForecasts.xlsx, taken from https://www.atlantafed.org/-/media/documents/cqer/researchcq/gdpnow/GDPTrackingModelDataAndForecasts.xlsx, with the chart page named "Chart1".

Accessing pages -- after the chart page -- by name do not result in the correct data being located. Consider the following code:

require 'open-uri' require 'simple_xlsx_reader'

doc2 = SimpleXlsxReader.parse(URI.open('https://www.atlantafed.org/-/media/documents/cqer/researchcq/gdpnow/GDPTrackingModelDataAndForecasts.xlsx'))
ary2 = doc2.sheets.detect{|sht| sht.name == 'TrackRecord'}.rows.to_a

After running the code, ary2 contains the data from the page following the one desired, "TrackingDeepArchives".

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

1 participant