05-15-2009 01:17 PM
DanNatCorning wrote:Guys, I really appreciate all your help and assistance. What I really want to be able to do is to open an instance of Excel right on the front panel (see attached below), as opposed to opening Excel is a separate window. I really like the appearance and functionality that I get with an ActiveX container with a Microsoft Office Spreadsheet 11.0 inserted. I just want to be able to open a specific file (template) within that ActiveX container. This way, the user never leaves LabVIEW. IS there a straightforward way to accomplish this? Does this make sense?
As smercurio pointed out, the Office Spreadsheet that you're embedding on your front panel isn't the same as the Excel application that your coworker's VI opens (from the beginning of the thread), and the Office Spreadsheet doesn't support the Excel Application properties and methods you're trying to use (although it does support similar properties and methods for workbooks and worksheets). Have you looked at the MSDN (Microsoft Developer Network) documentation for the Office Web Components (one of which is the spreadsheet)? It's really nothing to do with LabVIEW that you can't get this to work the way you expect, it's the limits of the ActiveX components that Microsoft provides.
05-15-2009 02:00 PM
05-15-2009 02:25 PM - edited 05-15-2009 02:26 PM
You may not have the system configured to view Excel files in the browser. What happens when you open an Excel workbook from within the browser?
Or, you're using Office 2007. Office 2007 changed the default behavior so that documents are opened in the application window rather than the browser window. If that's the case you can change the default behavior as described here.
05-15-2009 02:38 PM
05-15-2009 03:13 PM
That's normal behavior since the web browser is generating that dialog box. The same thing would happen if you were to try it from Internet Explorer. If you uncheck the box then you won't get the dialog next time. As far as it opening as a separate window, again, that's an operating system configuration. Check the internet, as this is a common problem.
You can use the Office Spreadsheet control, but it's your responsibility to populate the control's cells with the data from the Excel workbook. See attached for a simple example. The Read Excel VI is a VI that I had posted in a thread some time ago.