Excel Data Source at Runtime

Ask general questions here.
LouisF
Posts: 2
Joined: Wed Apr 24, 2013 6:31 pm

Excel Data Source at Runtime

Post by LouisF » Wed Apr 24, 2013 6:40 pm

I'm sorry but I believe I must be missing some very basic understanding.

I've created a project which gets its data from an Excel spreadsheet. It appears that when I run the created exe it will only look in the original location for the Excel spreadsheet. The report always says

Failed to get rows from data source: Could not find file <<original file path>>

I need to be able to run this executable in an environment that doesn't have the same exact folder structure.

How can I do this? I was hoping if I just stored it locally in the exe's directory that it might find it but it does not.

THANK YOU,
Louis

Alena
Posts: 20
Joined: Fri Feb 22, 2013 7:50 pm

Re: Excel Data Source at Runtime

Post by Alena » Thu Apr 25, 2013 2:16 pm

Hi, Louis!
I believe, your problem can be solved by opening Test Case properties window, choosing Data source tab, clicking Manage data sources button and checking "Copy file to project" in "Manage Data Sources" window.
I hope this helped.
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Excel Data Source at Runtime

Post by Support Team » Thu Apr 25, 2013 2:35 pm

Hello,

You would need to copy your data source into your project as shown in the attached file (enable ‘Copy File to Project’).
After this setting, a relative path is used to find your data source inside your project.
This file will be stored in your project directory and in ‘bin\debug’.

Please copy the files from the ‘bin\debug’ folder to your desired location and execute your test.
In order to run your test on a different environment, you would need to have Ranorex installed with a valid license (at least Runtime License).

Regards,
Markus (T)