-
Notifications
You must be signed in to change notification settings - Fork 51
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
No detection of column changes between compile-time and runtime #111
Comments
I have uploaded here rather than created an example branch as I do not have permission. I have tested again with 3.0 and it is still an issue. Adding the following Excel book and running the test confirm the behaviour still exists:
When column ordering is changed - the ExcelProvider doesn't recognise the new column ordering. The test above returns the String2 column rather than String - even though it has successfully identified in the underlying provider that the column ordering has changed. Upon further investigation, when
Please let me know your thoughts :) |
If you want a suggestion of changes in the form of a MR, I am happy to push my suggestions if I am given permission |
User Story
As a user, I want to compile a project against one excel file at compile time and then run it against another excel file at runtime. The second excel file potentially has a different ordering or number of columns.
Description
After compiling a project against one Excel file, when I run the project against a second file, the direct reference of a property by name pulls data from a column by index, while the .GetValue("Property") pulls data from the correctly named column. At runtime, the direct property reference should point towards the referenced column, rather than the column index of itself in the original workbook.
Repro steps
row.Column A
,row.Column B
androw.Column D
with the following excel file columns:row.GetValue("Column D")
, rather thanrow.Column D
, it would return "D Value"Expected behavior
For the example above, it would be expected that the program prints out "A Value", "B Value" and "D Value", as we're still referencing the Column D from the original program
Actual behavior
For the example above, it actually prints out "A Value", "B Value" and "C Value"
Known workarounds
The known workaround is to use the .GetValue method instead of referencing the column directly, but then it defeats the purpose of the intellisense against each of the columns
Related information
The text was updated successfully, but these errors were encountered: