osvaldo Posted November 25, 2009 Report Posted November 25, 2009 Hi to you guy! I'm writing an application that collects data from a test machine and than creates a printed report based on an excel file template (xltx). I'm able to create the final excel file to print (i'm using the Office Report Toolkit to do that) or save. I let the user to select the template file on the fly, using the standard File Dialog Window and then run the VI that make the report... Now the problem I'm not able to solve... He had request to have a little preview of the file selected that help him to select the right template... He would have a dialog with a listbox populated with the files names, and a box on the right that show the preview of the file actualy selected in the listbox... I've tried a number of methods to achieve the goal with no results! I've tried the PrintPreview ActivieX into an ActiveX container with no result! Using the Excel ActiveX in ActiveX container lat me show the file, but I can't find a zoom property!! Perhaps using the .NET container? I don't know how... HELP ME!!! Anyone of you gurus knows a way to make that possible? Best regards Osvaldo Quote
Mike C Posted November 25, 2009 Report Posted November 25, 2009 Osvald, I am sure there is a more elegant way than what I am about to suggest but it has worked for me for viewing PDF files. Just create a web browser activex container and load the file to preview there. Let the browser decide that the correct application is to view the file (acrobat, other pdf viewer, excel, etc). Michael Quote
osvaldo Posted November 25, 2009 Author Report Posted November 25, 2009 Osvald, I am sure there is a more elegant way than what I am about to suggest but it has worked for me for viewing PDF files. Just create a web browser activex container and load the file to preview there. Let the browser decide that the correct application is to view the file (acrobat, other pdf viewer, excel, etc). Michael What idea! Unfortunately, the method works only with files that Internet Explorer is able to show independently or as a plug-in... does not work with Excel spreadsheets, which instead are downlod and opened directly with Excel ... Among the activeX is also available ThumbCtl ... I tried it and I saw the preview that makes the files as shown in the File Explorer ... but excel is not made the preview ... only the icon! Thanks for your help ... 'm open to any suggestions! Hello Osvaldo Quote
Mike C Posted November 25, 2009 Report Posted November 25, 2009 What idea! Unfortunately, the method works only with files that Internet Explorer is able to show independently or as a plug-in... does not work with Excel spreadsheets, which instead are downlod and opened directly with Excel ... Among the activeX is also available ThumbCtl ... I tried it and I saw the preview that makes the files as shown in the File Explorer ... but excel is not made the preview ... only the icon! Thanks for your help ... 'm open to any suggestions! Hello Osvaldo Could you convert it to a pdf before showing? Alternatively you can use an activex control called DSO Framer that will allow you to open an office document to display. I don't know if you can open it directly in preview mode though. I hope this helps Michael Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.