LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

If an application includes ActiveX references from Excel, should MS Office be installed on the run-time PC?

Solved!
Go to solution

There are many threads regarding usage of MS office with LV, but I was not able to find the answer to the following question. I hope somebody can help or point me to a useful thread.

 

I have an excel template file and would like to create new reports each time from it. There are a couple of solutions for this problem which are fine. But, at the end, I am going to build an application and install it on an industrial PC which does not have MS office installed. The question is if the application works on the target machine as well.

 

I am specifically pointing to the solution in here which uses ActiveX reference to Excel._Application. Any chance that this solution or any similar one works on my target PC?

 

If you wonder why I want excel reports on a machine that does not have MS Office, I should say that the reports are just stored somewhere on the disk to be transferred later to headquarters let say!

 

Developing machine: Win7, LV8.6 Pro + Report generation toolkit

Target machine: WinXP SP3, LV run-time engine

 

Thanks in advance!

Soroush

0 Kudos
Message 1 of 8
(2,821 Views)
Solution
Accepted by topic author Soroush

You need to have Office installed on the computer that is running the LabVIEW application. It is the Office applications that provide ActiveX functionality to the Report Generation Toolkit. Without them, LabVIEW has nothing to interface to.

 

http://digital.ni.com/public.nsf/allkb/02E339E26484F30186256E920061FBD9

 

 

Message 2 of 8
(2,816 Views)

Fair enough! Thanks.

0 Kudos
Message 3 of 8
(2,811 Views)

Good News! It is possible.

 

More accurately, it is possible to open an unprotected xls file and update contents of the cells.

See the solution here. Look under LabVIEW, and into the 3rd paragraph.

 

The only modification I needed was to install Microsoft Access Database Engine Redistributables 2007 instead of 2010 version.

 

Hope it helps somebody!

 

0 Kudos
Message 4 of 8
(2,788 Views)

Hi,

I wonder if there is a similar way to create XSL files? I read that with Microsoft Access Database Engine one can only transfer data between existing Microsoft Office files (so read and write data). In certain circumstances my app has to create new file. 
This is not a problem if MS Office is installed, but I cannot be sure that it will be on all machines. 
Is it OK to add an empty document to project and then use it? Whenever I needed new document I would make a copy of that empty file.

Any ideas?

Thank you. 

0 Kudos
Message 5 of 8
(2,711 Views)

@gtu wrote:

[...]

Is it OK to add an empty document to project and then use it? Whenever I needed new document I would make a copy of that empty file.

Any ideas?

Thank you. 


I've seen that done before.  Seems sound to me.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 8
(2,704 Views)

gtu,

 

In my case, I had made an empty XLS file on my development PC with Microsoft Office installed. More accurately, it was an empty template for a report that only needed insertion of data to become a nice complete report. I did not have Microsoft office on my deployment machine, but every time I needed a new report, I began by copying the template and renaming it by attaching date and time string to the original file name. The rest is just editing the copied file and inserting some data into the specific cells. Of course, this works only if you have a fixed template for the XLS files you want to create.

 

To make a copy of any file, you can just use LabVIEW.

 

Soroush

0 Kudos
Message 7 of 8
(2,687 Views)