index > Visual Studio Tools for Office > Excel Smart document variable passing

Excel Smart document variable passing

Is there a way to pass variables to an Excel Smartdocument pre-load?  I'm retrieving data from a DB and displaying it, and I've seen ways within the excel document to call and load the data(using menus and event handlers), but I'm trying to open up my Excel windows from a webform, and based on when/where it is called, I am going to want to load different data from the DB.  Right now I'm using a workaround of using handlers to "catch" the first 3 changes(the 3 variables I want to set), and then calling the datadisplaying functions, but I'd like to not have to deal with that and have the Sheet1_Startup() event handler fill in the data with variables that are already there. 

Any references or places I can look?

Andrew McGhie

Hi Andrew,

It sounds like you're trying to modify an Excel doc outside of Excel.  This can be done through VSTO's ServerDocument class.  The "How to: Insert Data into a Workbook on a Server" tutorial is a good place to get started.

Hope this helps.

Ian

 

Ian Ching
reply 2

You can use google to search for other answers

 

More Articles

• How to use CDO object with C#
• rtf/wmf question
• I cannot get Add-in object instance in Outlook VBScript
• 1 Add-In uses .net 1.1, a second uses .net 2.0
• Copying contacts
• Publishing Issue VSTO Word Project
• office activex document server eat my message loop
• VSTO load error
• Custom Menu
• Office Web Components: axSpreadSheet issue
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• If an Add-In won't load, then what?
• outlook plug-in help
• ISmartdocument debug problem in VS.NET 2
• Can we customize Calendar View in Outlo
• How to Hide controls during printing or
• newbie to vsto with problems
• referencing listobject control from This
• Access Web browser from MS Word 2003
• Error opening an excel file with cached
• URGENT-VSTO compatibility info...
• Save each page of a word merge as pdf file
• in a web brouser navigation control i ne
• Evet type: clr20r3 P1: outlook.exe P2: 1
• Any changes in the shim program?
• Ribbon in Excel 2003

Hot Articles

• ms access vba tiff image handling
• Visio 2003 Add-in (Get Selected Shape in
• Uninstalling addins: removing menuitems
• VSTO Properties Settings are the same as
• Strange problem with the plugin...
• FaceId's
• Documentation for Office Add-ins
• Deploying Word Solution
• regard excel very urgent
• .net application with an excel interface
• Outlook 2007: How to stop progress bar i
• exporting mdf to excel format
• Upgrade record
• How do I Edit Word Template in Visual St
• Creating word template with bookmarks. i

Recommend Articles

• How to Read a Date from other sheet in C
• Switching to an existing instance of out
• API request; Drag & Drop
• Recommendation for Office 2007 developme
• Handling ComException
• VSTO Excel: Unable to read a range into
• Beta Samples don't work with the RC? can
• How to copy the sheet on excel developme
• Missing Office-Template using VS-Pro 200
• HOw to handle this using c#
• 1.1 Add-in fails to load on 2.0 system
• Fail to add Excel 11.0 to project refere
• save a document without the action pane
• Convert to VSTO - (EXCEL)
• Generating an MS Word doc on the fly