Excel Automation With Coded UI Test

Excel Automation With Coded UI Test

  • Comments 3

 The three matrix that I have validated and shared are 

  1. Excel 2013 X VS 2013 Update2
  2. Excel 2010 X VS 2013 Update2
  3. Excel 2010 X VS 2012

Install Instructions:

  1. Hit F5 on the solution. That installs the Excel Add-In
  2. Copy Microsoft.VisualStudio.Test.Sample.UI.dll to UITestExtensionPackages and PrivateAssemblies
  3. Copy Microsoft.VisualStudio.Test.Sample.UI.Excel.Communication.dll to PrivateAssemblies. 

 Important Points: 

  1. In case of VS 2013, you need update 2 to get things working
  2. Donot use two plugins at once. Pick the required set and ensure that only one addin is loaded into excel. To be sure go to Excel -> File -> Options -> Add Ins -> Manage combobox (Com Add ins) -> Go. Here remove the CodedUIAddinHelper. Open the appropriate solution from above and hit F5. This will launch excel and also loads the plugin. Subsequent launches of excel can be done from anywhere (taskbar etc)
  3. I have implemented Value as a writable properly that can be handcoded.

 

Note:

  • Path to UITestExtensionPackages will usually be something like C:\Program Files (x86)\Common Files\Microsoft Shared\VSTT\12.0\UITestExtensionPackages 
  • Path to PrivateAssemblies will usually be something like C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies
Attachment: ExcelPlugins.zip
Leave a Comment
  • Please add 2 and 3 and type the answer here:
  • Post
  • Thanks (^_^)

  • Hi,

    Thanks for the great post.

    In the project I am working, we have both excel 2010 and 2013 which needs to be tested. Our coded UI test is created based on 2010 visual studio and we are about to upgrade to VS 13 update 2.

    Is there any way to automate the tests for both versions of excel using only one solution ? It would be quite difficult to arrange the continuous integration with two different builds.

    Best Regards,

    Mon

  • Hello Thej,

    Thank you for the plugin. I'm using Excel 2013 X VS 2013 version. But i do not find the specified "Microsoft.VisualStudio.Test.Sample.UI.dll" (the second dll is ok)

    In additional, what do i need to do after finding and copying this dll?

    To reference these dlls in my CodedUI project?

    To add my CodedUI project under your solution?

    Thank you

Page 1 of 1 (3 items)