ui-automation icon indicating copy to clipboard operation
ui-automation copied to clipboard

Cannot set cell value in Excel 2016

Open mturchyn opened this issue 7 years ago • 5 comments

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

mturchyn avatar Sep 19 '17 11:09 mturchyn

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 avatar Sep 25 '17 20:09 mmarquee

@mmarquee I wonder if there are any updates on this?

mturchyn avatar Oct 13 '17 11:10 mturchyn

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.

mmarquee avatar Oct 16 '17 09:10 mmarquee

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

mmarquee avatar Dec 23 '17 17:12 mmarquee

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.

mmarquee avatar Dec 24 '17 10:12 mmarquee