Ask a Question

Microsoft Excel issue

New Contributor

Microsoft Excel issue

Good morning,


Just wondering if anyone has experienced this before or knows what is going on...


Currently, we are using runner machines that are on Windows 7 OS along with Excel 2013. We have a test that when it starts up, it reads from an excel file without actually opening it to verify the columns are present in the file so for a few seconds it is running this in the background then after a minute it starts running the test in our company's software using information in that data file. 


We recently decided to move to new runner machines which are running Windows 10 OS and Excel 2016. When we run that exact same test, during that same time period of it reading the data file, instead of checking and moving on we are getting a message asking us if we want to Save, Don't Save, or Cancel. Because of this message box coming up, the test thinks it is still doing stuff with excel so it won't proceed. We are not actually changing anything in the data file so there isn't anything to save. 


Would this because of the change in OS and version of Excel? Is it reading the data file and something happens in the background of Microsoft Excel where it thinks "oh hey, this was created in 2013 and I am 2016 so I am running something in the background/updating the file and now there is a change"?


Anyone have any thoughts on this? The examples I am using are Macro enabled excel files so I don't know if that makes a difference...?


I appreciate any help. Thanks.

Champion Level 2

Who knows what Microsoft did between those versions, could be anything.


Why not just add a step in your test to handle the dialog box?



Yes that is a known issue in automation for Excel

Opening a 2013 file in 2016, even you if don't change anything, will cause Excel to bring up a box stating that the you have to accept that the file will be saved in the new 2016 format.


My recommendation is to save the files as 2016 files once before you start the COM automation with Excel from inside of TestComplete





Depending on how you are reading Excel file, I hope that there might be an option to command Excel to close file ignoring changes (and thus do not display any dialog).


  /Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
Showing results for 
Search instead for 
Did you mean: