ui-automation
ui-automation copied to clipboard
Cannot set cell value in Excel 2016
Hello,
I am trying to use your example for Excel 2016 and I am not able to set cell value, though I can read it.
Code sample:
AutomationDataGridCell cell = ... cell.select(); // Works cell.setValue("5555"); // Doesn't work
I have had a play with this, but I have Excel 2016 only, and the examples no longer work as I would expect - I think the underlying hierarchy of the elements has changed, so I will update the documentation and let you know whether it still works
@mmarquee I wonder if there are any updates on this?
Hi, I am still looking at this, I now have access to Excel 2016, and it looks like the structure the elements on the screen has changed, and so we have to navigate down to the grid different;y. I might be able to look at it this week, depending on my 'real work' schedule.
I have returned to this issue, and it seems to 'set' the value, without actually changing the value in the cell. I will continue to investigate
I've done a bit more experimenting, and it looks like a bug somewhere in Excel or the automation library - I can get the value via the inspect tool (i,e. using automation, but not the library), and it behaves in the same way - it sets the value (you can see in the inspector, but the actual value in the cell doesn't change. I will keep this issue open and periodically restest - especially when a new release of Excel happens.