Excel File read/write

Class library usage, coding and language questions.
Posts: 23
Joined: Fri Nov 30, 2018 6:03 pm

Excel File read/write

Post by maamer » Wed Jan 09, 2019 5:29 pm

i am trying to open an excel file read values from a cell, execute my test and save the output in a cell and close the excel file. i am trying to use the example codes from this forum. i get the following error.

Task failed because "AxImp.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AxImp.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task. (MSB3091)

i am using correct references

using Excel=Microsoft.Office.Interop.Excel;
using System.Runtime.InteropServices;

i have also added the excel object in the COM reference library.
i have reinstalled Win SDK.

please help.

Thank you

User avatar
Ranorex Guru
Ranorex Guru
Posts: 6557
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Excel File read/write

Post by odklizec » Thu Jan 10, 2019 9:14 am


This "AxImp.exe not found" error has been discussed and solved here:
task-failed-because-aximp-exe-was-not-f ... tml#p51871
task-failed-because-aximp-exe-was-not-f ... tml#p51940
Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Posts: 6
Joined: Wed Jan 30, 2019 10:36 pm

Re: Excel File read/write

Post by Manidipta » Sat Jun 01, 2019 8:15 am

I don't see 'Microsoft Excel XX.X Object' Library under 'COM' tab while trying to add as reference. I am using Ranorex 9.0 ver.
Can you please tell me where i can find and how can i add?

"i have also added the excel object in the COM reference library.
i have reinstalled Win SDK."

@maamer -> Can you please mention the steps?

Tom Black
Posts: 1
Joined: Thu Jul 23, 2020 11:53 am

Re: Excel File read/write

Post by Tom Black » Mon Jul 27, 2020 3:23 pm

You can try ZetExcel. I think it will help to you.