-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unexpected "Could not extract sheet" #6
Comments
There seem to be some inconsistencies in this file, like incomplete xml nodes
node the value node v is not opened, only closed. |
The |
All values for column "D" are formulas (except the header) so they have an empty value |
My bad on last comment about empty values, opening the files as zip files and inspecting the sheet1.xml I can see that the values are there too (besides the formula). But the problem on the second loop pass seems corrected flagged as error, although the message can confuse the user. |
Although my logic seems correct about the possible failure on the second loop pass, when I added a
|
Thank you for the notes! 1 - Could not extract sheet: the main one, fixed in 002fdc0, amplxl was not prepared to handle targets defined by full paths in workbook.xml.rels. 2 - The fourth column in the COLtest2.xlsx file has formulas but the value of the cells is empty (except for the header). When we open the spreadsheet with a manager (like Excel) it updates the spreadsheet. However if we read with amplxl the values are not read because they are empty. This is also the reason why the file size increases after being saved with Excel. 3 - The indexed table is not discarding invalid subscripts on the second pass. This is independent from the Table Handler. I have a minimal example with .tab files but it does not seem to be possible to attach it here. |
Here is a more concise script that shows the problem in ampl table handling:
Output:
|
Looking through ampl code in debug mode several times could not find where the data read from the table is assigned to the parameter. |
Today I advanced a bit more on this issue, in table.c::assign_outargs function the logic that check when new elements are added to the current convar->val.rval, it can somehow fixed by adding this:
But that is not enough there is another problem in let.c::assign_outargs and it's call tree that I could not properly identify yet. |
Unpack COLtest.zip and execute
include COLtest.run
which reads two spreadsheet files in a loop using amplxl. The first file is read successfully (though with some invalid subscripts discarded), but the second one is rejected with aCould not extract sheet
message:The two spreadsheet files have the same amount of data of the same kind, but strangely, they are not the same size. When the second one is read into Excel and then saved, the error no longer occurs. However there is now another strange behavior, as the invalid subscripts from the second file are read into param COL rather than being discarded:
The text was updated successfully, but these errors were encountered: