How to write data i excel from application? : Automation API

How to write data i excel from application?

Class library usage, coding and language questions.

How to write data i excel from application?

Postby pripari » Tue Apr 10, 2012 5:07 pm

We are trying to send variable data in excel from Ranorex while execution. Please suggest the way to do this. We checked exceldataconnector but could'nt get proper code for the same. any help would be appreciated.

thanks
pripari
 
Posts: 4
Joined: Tue Apr 10, 2012 5:04 pm

Re: How to write data i excel from application?

Postby Support Team » Wed Apr 11, 2012 2:38 pm

Hi,

Just to clarify this, you want to send variables from Ranorex Studio to your Excel sheet during the execution of your solution?
What do you want to accomplish whit this, or what is the sense of it?

Regards,
Markus
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 6860
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: How to write data i excel from application?

Postby pripari » Wed Apr 11, 2012 2:49 pm

We want to send variable names captured from application to external excel sheet which will be used for reprorting purpose. We are not able to get code for connecting to external excel sheet or creating new excel sheet within the code.
pripari
 
Posts: 4
Joined: Tue Apr 10, 2012 5:04 pm

Re: How to write data i excel from application?

Postby Ciege » Wed Apr 11, 2012 5:13 pm

Have a look here for my implementation of using Microsoft.Office.Interop.Excel.
http://www.ranorex.com/forum/my-excel-framework-methods-t3265.html
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
Ranorex Guru
 
Posts: 1270
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: How to write data i excel from application?

Postby pripari » Mon Apr 16, 2012 2:53 pm

"Microsoft.Office.Interop.Excel" does not exists in Project->add Reference->COM
How to add "Microsoft.Office.Interop.Excel" reference in ranorex studio?
pripari
 
Posts: 4
Joined: Tue Apr 10, 2012 5:04 pm

Re: How to write data i excel from application?

Postby Ciege » Mon Apr 16, 2012 5:07 pm

It's under .NET not COM.

From VS: References -> Add Reference -> .NET -> Microsoft.Office.Interop.Excel
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
Ranorex Guru
 
Posts: 1270
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: How to write data i excel from application?

Postby Support Team » Mon Apr 16, 2012 5:17 pm

Hi,
pripari wrote:How to add "Microsoft.Office.Interop.Excel" reference in ranorex studio?

If you have installed Excel on the machine you should find the Microsoft.Office.Interop.Excel assembly in the GAC folder of the Add Reference Dialog.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 6860
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: How to write data i excel from application?

Postby pripari » Mon Apr 16, 2012 6:15 pm

We have excel installed on that machine, but still we could not see Micorsoft.Office.Interop.Excel under GAC folder.
pripari
 
Posts: 4
Joined: Tue Apr 10, 2012 5:04 pm

Re: How to write data i excel from application?

Postby Support Team » Tue Apr 17, 2012 1:35 pm

Hi,
pripari wrote:We have excel installed on that machine, but still we could not see Micorsoft.Office.Interop.Excel under GAC folder.

If you want to interact with Excelobjects, you don't have to explicit add the Interop assembly, because Ranorex already has a reference to this assembly. Just use
Excel.Workbooks workBook = new Excel.WorkbookClass();

for example.

To check if you have access to this, check your reference folder and look if the office plugin is referenced to your project.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 6860
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests