Visual Studio Developer Center >
Visual Studio Forums
>
Visual Studio Tools for Office
>
Excel file preview: How to show inside a form?
Excel file preview: How to show inside a form?
- Good day everyone,
I am trying to design a template preview form to manage some Excel template documents.
Could someone have solution to handle Excel file preview as Windows Explorer does?
Thanks much in advanced!
Answers
- Hello Peter
This functionality is not exposed in the Office object models.
FWIW, I think the preview thumbnail is stored inside the file. Since Excel 2007 file format is a "package" of Zip files, I'm guessing you could find it there. The correct place to discuss these files is at OpenXMLDeveloper.org.
If that is not possible, then I believe the only possibility is to take screen shots of what you want to display and store these as graphic files.
Cindy Meister, VSTO/Word MVP- Marked As Answer byJi.ZhouMSFT, ModeratorTuesday, November 10, 2009 2:06 AM
All Replies
Hello,
What kind of form are you referring to? Do you mean you are creating a Windows Form and want to display Excel content in your Windows Form application?
If that is the case, you can use WebBrowser or DSOFramer to achieve this objective. I hope the following discussions and links can help you,
http://blogs.msdn.com/erikaehrli/archive/2005/08/26/hostofficeinnet.aspx
http://www.codeproject.com/KB/office/Embedding_Excel.aspxHave a nice day!
Ji ZhouMSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Hi Zi.Chou,
Thanks for your links.
However, what I want is a little difference.
Those 2 articles may , I think, only work well on Office 2003!? (need chance to test this)
Our system is an Excel 2007 Add-in, namely, we extend more features beside MS Excel (Ribbon tab, commands, and dialogs). Moreover, I hope to add an interesting effect in my Excel template management through Excel file preview data.
For example, get Preview/Thumbnail data of template files and show transparently them.
When we save an Excel file, Microsoft Excel 2007 offers a useful option: Save Thumbnail, which can help Explorer to show document previews (at least in Vista and Win7 Explorers).
In conclusion, could you tell me How to extract the thumbnail data in Excel files?
Good health! - Hello Peter
This functionality is not exposed in the Office object models.
FWIW, I think the preview thumbnail is stored inside the file. Since Excel 2007 file format is a "package" of Zip files, I'm guessing you could find it there. The correct place to discuss these files is at OpenXMLDeveloper.org.
If that is not possible, then I believe the only possibility is to take screen shots of what you want to display and store these as graphic files.
Cindy Meister, VSTO/Word MVP- Marked As Answer byJi.ZhouMSFT, ModeratorTuesday, November 10, 2009 2:06 AM


