06-19-2009 08:43 PM
The example is just a modification of the Write Table to XL example that ships with LabVIEW. It does not use the Report Generation Toolkit or any other toolkit. There will, however, be an issue with security in accessing the Visual Basic Project. I have no idea how to deal with this. I would suggest to the poster to Google for this, as this is not a LabVIEW issue, but a Microsoft Excel issue.
I did make one error in the example: I forgot to wire up the filename input for the "Open Specific Workbook" VI.
06-22-2009 02:48 AM
Thanks a lot for your example,
But it doesn't work for me.
I decreased the macro security level in excel to low, put the name for "open specific work book".
Can you explain your example ? the macro will be save in the excel work sheet?
I'm a bit lost !
06-22-2009 10:39 AM - edited 06-22-2009 10:40 AM
Try the modification attached. Note that I got this information from the web. Have you tried Google or MSDN on how to use the Excel object model?
As for the security, did you read the KB article that I provided in my earlier reply? In there it has a link to how to provide trust. It points to this KB article: Programmatic access to Office VBA project is denied.
NOTE: I still don't understand why you want to do it this way when you can simply call the methods and properties directly in LabVIEW. This seems like a complicated way to do it, and it requires that you mess around with the security levels in Excel, which means it's not easily portable to another computer without going in and messing around with the security settings on that computer as well. All in all, I think this is a convoluted way to do it.
06-23-2009 08:02 AM
Hi,
Thanks for help.
i'm not an "expert" in activeX and excel but for now i just want to test your example because is that i want :
Send data and after run a macro, that i built in labview, in excel.
So for your example, i put excel in low security and "trust into the VBA projects". after i put a root directory to a blank excel workbook.
But it doesn't work.
Plz help me with your example.
Thanks you.
06-23-2009 09:25 AM
06-24-2009 03:51 AM
I have excel 2003 too. When i run the vi, i have one error :Unknown System Error in Excel Macro.vi.
And i don't know why...
Do you an idea?
06-24-2009 11:56 AM
06-25-2009 02:41 AM
The only difference for me is that i use labview 8.6 and you 8.2 i believe.
Maybe there is a problem with this?
06-25-2009 03:10 AM
The error is make at proprety node "codes panes". What is this property and what is "index"?
Thanks you in advance
06-25-2009 09:31 AM