07-26-2013 02:29 PM
Also, since you decided to make the application not visible, you will have to save the workbook after writing the values to the range but before closing the application reference . If you don't, the workbook will be open in memory but not accessible. It's also good practice to close all references when you are through with them (i.e. worksheet, range, workbook, application, etc).
07-26-2013 02:51 PM
@aputman wrote:
Also, since you decided to make the application not visible, you will have to save the workbook after writing the values to the range but before closing the application reference . If you don't, the workbook will be open in memory but not accessible. It's also good practice to close all references when you are through with them (i.e. worksheet, range, workbook, application, etc).
FWIW, when you accidently (or otherwise) end up with an Excel application that is running (evidenced by seeing EXCEL.EXE in Windows Task Manager), but not visible from the screen, you can retrieve that Excel session by using "GetObject" in a Visual Basic script.
Dim eApp
Set eApp = GetObject(,"Excel.Application")
eApp.Visible = TRUE
Set eApp = Nothing
3. Save as a VBS file (GetExcel.vbs)
4. Double click file to run
That should latch onto the open application and modify the visible property.
07-29-2013 09:12 AM
I've added a "Save Workspace" node but still get an error after the Worksheet->Range invoke node
07-29-2013 09:57 AM
You need to save the opened workbook....not the workspace. And you need to change the "start row_col" values to 1,1 as 0,0 is not valid in Excel.
07-29-2013 01:58 PM
thanks, i got it working the way i want execpt for one small detail. I hard-coded a path with a file name in it but it keeps opening a dialogue box asking me which file to open, any clue as to how to remove this? Again i am going to be calling this VI from TestStand so I don't want to have to select a file each time it opens.
07-29-2013 03:56 PM
Remove the File Dialog vi at the front of your block diagram. That VI prompts you to choose a path everytime it is called.
07-30-2013 08:26 AM
thanks everyone for the help, got it working
05-30-2014 05:47 AM
Why I'm getting error
"Invalid index.
in ExportToExcel (1).vi
"