04-22-2012 06:43 PM
I am trying to learn communicating with Excel spreadsheet via ActiveX. I started with the Labview example "Write Table to XL", however, this example creates new file which is not my case of overwriting an existing Excel spreadsheet. So, I made my changes to the VI to overwrite an existing file with my new value. Unfortunately, there is always prompt of overwriting the file, and even though I press "yes", the file keeps unchanged.
The help I need is to kindly :
1- check my attached VI for any mistakes
2- make the VI overwriting the file without any prompts
Thanks in advance
Solved! Go to Solution.
04-23-2012 10:44 AM
04-23-2012 03:22 PM
Sure, and thanks for your help.
04-23-2012 03:27 PM
04-23-2012 03:40 PM
(Didn't had enough time to complete the edit)
You need to also include the subvi you modified.
You are using the OpenBook vi from the Write Table to XL exemple. Since you didn't include the modified Open Book subVI my guess is that you are connecting your file path to the template input of the add method, that is probably why you can't save the changes. This vi is used to add a new workbook to the workbooks collection (it uses the add method). To open an existing workbook you need to use the workbook open method. Then you can pass this reference to the open sheet vi
Ben64
04-23-2012 04:43 PM
I really appreciate your help, but I already changed the configuration to open a file path taking another ActiveX example as a reference. Here is my subVI's I used, but they are merged in LLB. I am sorry for my ignorance of how to extract all the subVI's from this file.
04-23-2012 04:52 PM - edited 04-23-2012 04:54 PM
I have tried to save each subVI in a new location and I got all of them separately. Hope they work, since I don't know how to check their compatibility for previous versions.
04-23-2012 08:38 PM
In your Open New Workbook.vi you have a Open/Create/Replace File.vi. You don't need that.
04-24-2012 04:25 AM
@nyc_(is_out_of_here) wrote:
In your Open New Workbook.vi you have a Open/Create/Replace File.vi. You don't need that.
Thanks for your help, it works fine.
I would be grateful if you put links for learning the alternative ways of communicating with Excel instead of ActiveX such as ADO, since I tried to learn these ways but I didn't found clear instructive resources (i.e. tutorials, examples).
Thanks
04-24-2012 08:43 AM - edited 04-24-2012 08:44 AM
Diaa Abidou wrote:I would be grateful if you put links for learning the alternative ways of communicating with Excel instead of ActiveX such as ADO, since I tried to learn these ways but I didn't found clear instructive resources (i.e. tutorials, examples).
Thanks
Do you even understand what you are asking?
ADO = ActiveX Data Objects