06-22-2010 06:02 PM
have you checked out the Excel Macro Example. Help->Find Examples... Search for Excel and choose your favorite.
06-22-2010 06:10 PM
@Darin.K wrote:
have you checked out the Excel Macro Example. Help->Find Examples... Search for Excel and choose your favorite.
Yeah, I'm looking at "Excel Macro Example.vi." Its pretty complicated for me (second day using labview), I'm hoping there's some sort of tutorial out there.
06-22-2010 06:23 PM
Hate to be the bearer of bad news, but that is about as gentle of an intro as you are going to get. ActiveX on your second day is pretty ambitious, but not too hard if you spent the first day going over LV tutorials.
No substitute for biting the bullet and learning, but some tips to help you out.
1) Turn on context help. Ctrl-H
2) Double Click all subVIs, open up the Block Diagrams, figure out what is going on.
3) Turn on context help.
4) Look at the VI descriptions and the control descriptions
5) Turn on context help.
6) Make some simple modifications to the VI (save a copy first)
7) Turn on context help.
😎 Run it with Execution Highlighting (the lightbulb)
You may want to turn on context help.
06-22-2010 06:38 PM
@Darin.K wrote:
Hate to be the bearer of bad news, but that is about as gentle of an intro as you are going to get. ActiveX on your second day is pretty ambitious, but not too hard if you spent the first day going over LV tutorials.
No substitute for biting the bullet and learning, but some tips to help you out.
1) Turn on context help. Ctrl-H
2) Double Click all subVIs, open up the Block Diagrams, figure out what is going on.
3) Turn on context help.
4) Look at the VI descriptions and the control descriptions
5) Turn on context help.
6) Make some simple modifications to the VI (save a copy first)
7) Turn on context help.
😎 Run it with Execution Highlighting (the lightbulb)
You may want to turn on context help.
Content help is awesome, thanks for letting me know about it. i'd been right clicking and choosing help which is less awesome and less helpful.
I've been looking in the VI's and trying to figure them out with more and more success.
The thing that bugs me is in the screenshot I attached, That is of the Open Excel subVI of the main example VI. I left click on "Visual" under the Application property node and get SO many options that come out of nowhere.
06-22-2010 06:51 PM
Excel_Application has a few more properties available than most. When I see a list like that, I go to the top where you'll see Browse... This calls the more managable Class Browser. Most of the properties are self-explanatory, and often times if you are unsure what to wire you can simply right-click the terminal and Create a Constant or a Control.
06-22-2010 06:52 PM
Another issue is that I still haven't figured out how to do is get a macro set up without having to give the VI a special excel document each time with the macro already in it. I want this process to be pain free for the user
06-22-2010 07:04 PM
@Darin.K wrote:
Excel_Application has a few more properties available than most. When I see a list like that, I go to the top where you'll see Browse... This calls the more managable Class Browser. Most of the properties are self-explanatory, and often times if you are unsure what to wire you can simply right-click the terminal and Create a Constant or a Control.
I don't have a Browse option (probably because I'm in 7.1)
Also, when I right click on a terminal, I don't get any option like "Create a Constant" (probably again because of 7.1)
06-22-2010 07:12 PM
@bobholmgren wrote:
I don't have a Browse option (probably because I'm in 7.1)
Also, when I right click on a terminal, I don't get any option like "Create a Constant" (probably again because of 7.1)
ouch
06-22-2010 07:14 PM
I'll use this I guess: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._application(office.11).aspx
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._application_members(v=office.11).aspx
etc.
Fun, haha
06-22-2010 07:32 PM
One thing I would try, and again I very rarely use Excel. Read the project.xls file (or an empty xls file you create with the proper macro) as a binary file and store it in a string constant. When it comes time to create your new Excel File, just write the string constant as a binary file in the proper location. Now you have an Excel file with the Macro in it already, and you don't have this extra file hanging around.