NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open an existing excel file in teststand without using LabView?

Hi,

 

How can I open an already existing excel file in TestStand without using LabView? I have found one example(excel_example.seq). In this example new excel file is created without using LabView. But I want to open an existing excel file.

 

Thanks

0 Kudos
Message 1 of 5
(4,874 Views)

if you simply want to open a file in excel then look at the attached example.  simply set locals.path equal to the file path before the step executes.

 

Otherwise, if you want a handle to the spreadsheet and want to edit it dynamically you would have to use the activeX or .NET API and just use the activeX or .NET steps.  The object model can be found here: http://msdn.microsoft.com/en-us/library/wss56bz7%28v=vs.80%29.aspx

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(4,867 Views)

Hi,

 

I am trying to open excel file using ActiveX 'Action' step but somehow its not working.

 

The link which gave having object model (http://msdn.microsoft.com/en-us/library/wss56bz7%28v=vs.80%29.aspx), is using C and VB. Whereas I am using teststand.

Please suggest me some examples of teststand sequence using ActiveX steps to open existing excel file.

 

Thanks,

0 Kudos
Message 3 of 5
(4,858 Views)

There is no ready-to-run example, as you are searching for, available.

This has several reasons:

- It depends on the version of Excel. Examples for Excel 2007 might not work with Excel 2010 for instance.

- No one just wants to open Excel without doing anything with it.

 

The second point is something, i want to ask you:

Why do you want to open an existing Excel file at all? What is it, what you want to do after opening it?

If you have LV/C/C#/VB examples doing what you are looking for, why do you want to have it in TestStand directly, so NOT using existing code (saving time and effort) and basically re-inventing the wheel?

 

ActiveX is an interface for remote controlling and embedding applications with/in other applications on Windows systems. It is a PROGRAMMING interface.

So naturally, examples and tutorials exist for programming languages. Those examples are easily converted to TestStand sequences with a basic knowledge of the programming language and TestStand. Providing links for such tutorials/examples is a valid way to give support to fellow developers because we expect the fellow to have that basic knowledge. 

If that knowledge is not present, i highly recommend to fill that gap.

 

just my 2 cents,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(4,851 Views)

Hruti wrote: "

The link which gave having object model (http://msdn.microsoft.com/en-us/library/wss56bz7%28v=vs.80%29.aspx), is using C and VB. Whereas I am using teststand.

Please suggest me some examples of teststand sequence using ActiveX steps to open existing excel file."

 

 

Hruti,

 

Yes they are in C and VB.  However, an object model tells you the API for a particular application.  In this case Excel.  Generally when I can't find an example in TestStand or LabVIEW then I look at the object model or other programming language examples and just create my own following the methods and properties they use.  If I get a chance (don't count on it soon) I can try and create an example but it would require me to do the same amount of research that you would have to do (i.e. parse through the object model and find the right methods and properties).

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 5
(4,841 Views)