Export (0) Print
Expand All

Workbook Members

Represents a Microsoft.Office.Interop.Excel.Workbook object that exposes events and acts as a container for components.

The following tables list the members exposed by the Workbook type.

  Name Description
Public constructor Workbook Overloaded.
Top

(see also Protected Properties )
  Name Description
Public property _CodeName
Public property _ReadOnlyRecommended
Public property AcceptLabelsInFormulas Gets or sets a value that indicates whether labels can be used in worksheet formulas. 
Public property ActiveChart Gets a Microsoft.Office.Interop.Excel.Chart object that represents the active chart (either an embedded chart or a chart sheet). An embedded chart is considered active when it is either selected or activated. When no chart is active, this property returns a null reference (Nothing in Visual Basic). 
Public property ActiveSheet Gets the active sheet (the sheet on top). 
Public property Application Gets an Microsoft.Office.Interop.Excel.Application that represents the creator of the workbook. 
Public property Author Gets or sets the author of the workbook. 
Public property AutoUpdateFrequency Gets or sets the number of minutes between automatic updates to the shared workbook. 
Public property AutoUpdateSaveChanges Gets or sets a value that indicates whether current changes to the shared workbook are posted to other users whenever the workbook is automatically updated. 
Public property BindingContext  (Inherited from BindableComponent.)
Public property BuiltinDocumentProperties Gets a Microsoft.Office.Core.DocumentProperties collection that represents all the built-in document properties for the workbook. 
Public property CalculationVersion Gets a number that indicates the version of Excel that the workbook was last fully recalculated by. The rightmost four digits are the minor calculation engine version number, and the other digits (on the left) are the major version of Microsoft Office Excel. 
Public property ChangeHistoryDuration Gets or sets the number of days shown in the shared workbook's change history. 
Public property Charts Gets a Microsoft.Office.Interop.Excel.Sheets collection that represents all the chart sheets in the workbook. 
Public property CodeName
Public property Colors Gets or sets colors in the palette for the workbook.  
Public property CommandBars Gets a Microsoft.Office.Core.CommandBars object that represents the Microsoft Office Excel command bars. 
Public property Comments Gets or sets the comments attached to the workbook. 
Public property ConflictResolution Gets or sets the way conflicts are to be resolved whenever a shared workbook is updated. 
Public property Container Gets the object that represents the container application for the workbook. 
Public property CreateBackup Gets a value that indicates whether a backup file is created when this file is saved. 
Public property Creator Gets the application in which the workbook was created. 
Public property CustomDocumentProperties Gets a DocumentProperties collection that represents all the custom document properties for the workbook. 
Public property CustomViews Gets a Microsoft.Office.Interop.Excel.CustomViews collection that represents all the custom views for the workbook. 
Public property DataBindings  (Inherited from BindableComponent.)
Public property Date1904 Gets or sets a value that indicates whether the workbook uses the 1904 date system. 
Public property DialogSheets Included for backwards compatibility only. 
Public property DisplayDrawingObjects Gets or sets how shapes are displayed. 
Public property DisplayInkComments Gets or sets a value that indicates whether ink comments are displayed in the workbook. 
Public property DocumentLibraryVersions Gets a Microsoft.Office.Core.DocumentLibraryVersions collection that represents the collection of versions of a shared workbook that has versioning enabled and that is stored in a document library on a server. 
Public property EnableAutoRecover Gets or sets a value that indicates whether Microsoft Office Excel saves changed files, of all formats, on a timed interval. 
Public property EnvelopeVisible Gets or sets a value that indicates whether the e-mail composition header and the envelope toolbar are both visible. 
Public property Excel4IntlMacroSheets Gets a Microsoft.Office.Interop.Excel.Sheets collection that represents all the Microsoft Office Excel 4.0 international macro sheets in the workbook. 
Public property Excel4MacroSheets Gets a Microsoft.Office.Interop.Excel.Sheets collection that represents all the Microsoft Office Excel 4.0 macro sheets in the workbook. 
Public property FileFormat Gets the file format and type of the workbook. 
Public property FullName Gets the name of the object, including its path on disk. 
Public property FullNameURLEncoded Gets the name of the object, including its path on disk. 
Public property HasMailer
Public property HasPassword Gets a value that indicates whether the workbook has a protection password. 
Public property HasRoutingSlip Gets or sets a value that indicates whether the workbook has a routing slip. 
Public property HighlightChangesOnScreen Gets or sets a value that indicates whether changes to the shared workbook are highlighted on screen. 
Public property HTMLProject Gets the Microsoft.Office.Core.HTMLProject in the workbook, which represents a top-level project branch. 
Public property InactiveListBorderVisible Gets or sets a value that indicates whether list borders are visible when a list is not active. 
Public property InnerObject Gets a Microsoft.Office.Interop.Excel.Workbook that represents the underlying native object for the Workbook
Public property IsAddin Gets or sets a value that indicates whether the workbook is running as an add-in. 
Public property IsInplace Gets a value that indicates whether the specified workbook is being edited in place. 
Public property KeepChangeHistory Gets or sets a value that indicates whether change tracking is enabled for the shared workbook. 
Public property Keywords Gets or sets the keywords attached to the workbook. 
Public property ListChangesOnNewSheet Gets or sets a value that indicates whether changes to the shared workbook are shown on a separate worksheet. 
Public property Mailer
Public property Modules Included for backwards compatibility only. 
Public property MultiUserEditing Gets a value that indicates whether the workbook is open as a shared list. 
Public property Name Gets the name of the workbook. 
Public property Names Gets a Microsoft.Office.Interop.Excel.Names collection that represents all the names in the workbook (including all worksheet-specific names). 
Public property OnSave Included for backwards compatibility only. 
Public property OnSheetActivate Included for backwards compatibility only. 
Public property OnSheetDeactivate Included for backwards compatibility only. 
Public property Parent Gets the parent object for the workbook. 
Public property Password Gets or sets the password that must be supplied to open the workbook. 
Public property PasswordEncryptionAlgorithm Gets the algorithm that Microsoft Office Excel uses to encrypt passwords for the workbook. 
Public property PasswordEncryptionFileProperties Gets a value that indicates whether Microsoft Office Excel encrypts file properties for the specified password-protected workbook. 
Public property PasswordEncryptionKeyLength Gets the key length of the algorithm that Microsoft Office Excel uses when encrypting passwords for the workbook. 
Public property PasswordEncryptionProvider Gets the name of the algorithm encryption provider that Microsoft Office Excel uses when encrypting passwords for the workbook. 
Public property Path Gets the complete path to the application, excluding the final separator and name of the application. 
Public property Permission Gets a Microsoft.Office.Core.Permission object that represents the permission settings in the workbook. 
Public property PersonalViewListSettings Gets or sets a value that indicates whether filter and sort settings for lists are included in the user's personal view of the shared workbook. 
Public property PersonalViewPrintSettings Gets or sets a value that indicates whether print settings are included in the user's personal view of the shared workbook. 
Public property PrecisionAsDisplayed Gets or sets a value that indicates whether calculations in this workbook will be done using only the precision of the numbers as they are displayed. 
Public property ProtectStructure Gets a value that indicates whether the order of the sheets in the workbook is protected. 
Public property ProtectWindows Gets a value that indicates whether the windows of the workbook are protected. 
Public property PublishObjects Gets the Microsoft.Office.Interop.Excel.PublishObjects collection. 
Public property ReadOnly Gets a value that indicates whether the workbook has been opened as read-only. 
Public property ReadOnlyRecommended Gets or sets a value that indicates whether the workbook was saved as read-only recommended. 
Public property RemovePersonalInformation Gets or sets a value that indicates whether personal information can be removed from the workbook. 
Public property RevisionNumber Gets the number of times the workbook has been saved while open as a shared list. If the workbook is open in exclusive mode, this property returns 0 (zero). 
Public property Routed Gets a value that indicates whether the workbook has been routed to the next recipient. 
Public property RoutingSlip Gets a Microsoft.Office.Interop.Excel.RoutingSlip object that represents the routing slip for the workbook. 
Public property Saved Gets or sets a value that indicates whether no changes have been made to the workbook since it was last saved. 
Public property SaveLinkValues Gets or sets a value that indicates whether Microsoft Office Excel saves external link values with the workbook. 
Public property SharedWorkspace Gets a SharedWorkspace that represents the Document Workspace in which the workbook is located. 
Public property Sheets Gets a Microsoft.Office.Interop.Excel.Sheets collection that represents all the sheets in the workbook. 
Public property ShowConflictHistory Gets or sets a value that indicates whether the Conflict History worksheet is visible in the workbook that is open as a shared list. 
Public property ShowPivotTableFieldList Gets or sets a value that indicates whether the PivotTable field list can be shown. 
Public property Site  (Inherited from Component.)
Public property SmartDocument Gets a Microsoft.Office.Core.SmartDocument that represents the settings for a smart document solution. 
Public property SmartTagOptions Gets a Microsoft.Office.Interop.Excel.SmartTagOptions object representing the options that can be performed with a smart tag. 
Public property Styles Gets a Microsoft.Office.Interop.Excel.Styles collection that represents all the styles in the workbook. 
Public property Subject Gets or sets the subject for the mailer or routing slip. 
Public property Sync Gets a Microsoft.Office.Core.Sync object that provides access to the methods and properties of documents that are part of a Document Workspace. 
Public property Tag Gets or sets the object that contains data about the workbook. 
Public property TemplateRemoveExtData Gets or sets a value that indicates whether external data references are removed when the workbook is saved as a template. 
Public property Title Gets or sets the title of the Web page when the workbook is saved as a Web page. 
Public property UpdateLinks Gets or sets a value that indicates a workbook's setting for updating embedded OLE links. 
Public property UpdateRemoteReferences Gets or sets a value that indicates whether Microsoft Office Excel updates remote references in the workbook. 
Public property UserControl
Public property UserStatus Gets a 1-based, two-dimensional array that provides information about each user who has the workbook open as a shared list. 
Public property VBASigned Gets a value that indicates whether the Visual Basic for Applications project for the workbook has been digitally signed. 
Public property VBProject Gets the virtual Microsoft.Vbe.Interop.VBProject project that is in the workbook. 
Public property VstoSmartTags Gets the Microsoft.Office.Tools.SmartTagCollection associated with the workbook. 
Public property WebOptions Gets the Microsoft.Office.Interop.Excel.WebOptions collection, which contains workbook-level attributes used by Microsoft Office Excel when you save a document as a Web page or open a Web page. 
Public property Windows Gets a Microsoft.Office.Interop.Excel.Windows collection that represents all the windows in the workbook. 
Public property Worksheets Gets a Microsoft.Office.Interop.Excel.Sheets collection that represents all the worksheets in the workbook. 
Public property WritePassword Gets or sets the write password of a workbook. 
Public property WriteReserved Gets a value that indicates whether the workbook is write-reserved. 
Public property WriteReservedBy Gets the name of the user who currently has write permission for the workbook. 
Public property XmlMaps Gets an Microsoft.Office.Interop.Excel.XmlMaps collection that represents the schema maps that have been added to the workbook. 
Public property XmlNamespaces Gets an Microsoft.Office.Interop.Excel.XmlNamespaces collection that represents the XML namespaces contained in the workbook. 
Top

  Name Description
Protected property CanRaiseEvents  (Inherited from Component.)
Protected property ContainerComponent  (Inherited from BindableComponent.)
Protected property DesignMode  (Inherited from Component.)
Protected property Events  (Inherited from Component.)
Top

(see also Protected Methods )
  Name Description
Public method _PrintOut
Public method _Protect
Public method _SaveAs
Public method AcceptAllChanges Accepts all changes in the shared workbook.  
Public method Activate Activates the first window associated with the workbook.  
Public method AddToFavorites Adds a shortcut to the workbook to the Favorites folder.  
Public method BeginInit
Public method BreakLink Converts formulas linked to other Microsoft Office Excel sources or OLE sources to values.  
Public method CanCheckIn Gets a value that indicates whether Microsoft Office Excel can check in the workbook to a server.  
Public method ChangeFileAccess Changes the access permissions for the workbook. This might require an updated version to be loaded from the disk.  
Public method ChangeLink Changes a link from one document to another.  
Public method CheckIn Gets a workbook from a local computer to a server, and sets the local workbook to read-only so that it cannot be edited locally. Calling this method closes the workbook.  
Public method Close Closes the workbook.  
Public method CreateObjRef  (Inherited from MarshalByRefObject.)
Public method DeleteNumberFormat Deletes a custom number format from the workbook.  
Public method Dispose Overloaded. Releases the unmanaged resources used by the Workbook and optionally releases the managed resources.  
Public method Dummy16
Public method Dummy17
Public method EndInit
Public method EndReview Terminates a review of a file that has been sent for review using the SendForReview method.  
Public method Equals  Overloaded. (Inherited from Object.)
Public method ExclusiveAccess Assigns the current user exclusive access to the workbook that is open as a shared list.  
Public method FollowHyperlink Displays a cached document, if it has already been downloaded. Otherwise, this method resolves the hyperlink, downloads the target document, and displays the document in the appropriate application.  
Public method ForwardMailer
Public method get_Colors
Public method GetHashCode  (Inherited from Object.)
Public method GetLifetimeService  (Inherited from MarshalByRefObject.)
Public method GetType  (Inherited from Object.)
Public method HighlightChangesOptions Controls how changes are shown in a shared workbook.  
Public method InitializeLifetimeService  (Inherited from MarshalByRefObject.)
Public method LinkInfo Gets the link date and update status.  
Public method LinkSources Returns an Array of links in the workbook.  
Public method MergeWorkbook Merges changes from one workbook into an open shared workbook.  
Public method NewWindow Creates a new window.  
Public method OnShutdown
Public method OnStartup
Public method OpenLinks Opens the supporting documents for a link or links.  
Public method PivotCaches Gets a Microsoft.Office.Interop.Excel.PivotCaches collection that represents all the PivotTable caches in the specified workbook.  
Public method PivotTableWizard Creates a Microsoft.Office.Interop.Excel.PivotTable object.  
Public method Post Posts the workbook to a public folder. This method works only with a Microsoft Exchange client connected to a Microsoft Exchange server.  
Public method PrintOut Prints the workbook.  
Public method PrintPreview Shows a preview of the object as it would look when printed.  
Public method Protect Protects a workbook so that it cannot be modified.  
Public method ProtectSharing Saves the workbook and protects it for sharing.  
Public method PurgeChangeHistoryNow Removes entries from the change log for the workbook.  
Public method RecheckSmartTags Causes a foreground smart tag check to occur automatically annotating data that was not annotated before.  
Public method Static ReferenceEquals  (Inherited from Object.)
Public method RefreshAll Refreshes all external data ranges and PivotTable reports in the workbook.  
Public method RejectAllChanges Rejects all changes in the shared workbook.  
Public method ReloadAs Reloads a workbook based on an HTML document, using the specified document encoding.  
Public method RemoveCustomization Removes the Visual Studio Tools for Office customization from the workbook.  
Public method RemoveUser Disconnects the specified user from the shared workbook.  
Public method Reply
Public method ReplyAll
Public method ReplyWithChanges Sends an e-mail message to the author of a workbook that has been sent out for review, notifying him or her that a reviewer has completed review of the workbook.  
Public method ResetColors Resets the color palette to the default colors.  
Public method Route Routes the workbook, using the workbook's current routing slip.  
Public method RunAutoMacros Runs the Auto_Open, Auto_Close, Auto_Activate, or Auto_Deactivate macro attached to the workbook. This method is included for backward compatibility. You should use the Open, Close, Activate and Deactivate events instead of these macros.  
Public method Save Saves changes to the workbook.  
Public method SaveAs Saves changes to the workbook in a different file.  
Public method SaveAsXMLData Exports the data that has been mapped to the specified XML schema map to an XML data file.  
Public method SaveCopyAs Saves a copy of the workbook to a file but does not modify the open workbook in memory.  
Public method sblt
Public method SendFaxOverInternet Sends the active sheet in the workbook as a fax to the specified recipients.  
Public method SendForReview Sends a workbook in an e-mail message for review to the specified recipients.  
Public method SendMail Sends the workbook by using the installed mail system.  
Public method SendMailer
Public method set_Colors
Public method SetLinkOnData Sets the name of a procedure that runs whenever a DDE link is updated.  
Public method SetPasswordEncryptionOptions Sets the options for encrypting the workbook using a password.  
Public method ToggleFormsDesign Toggles Microsoft Office Excel into and out of design mode.  
Public method ToString  (Inherited from Component.)
Public method Unprotect Removes protection from the workbook. This method has no effect if the workbook is not protected.  
Public method UnprotectSharing Turns off protection for sharing and saves the workbook.  
Public method UpdateFromFile Updates a read-only workbook from the saved disk version of the workbook if the disk version is more recent than the copy of the workbook that is loaded in memory. If the disk copy has not changed since the workbook was loaded, the in-memory copy of the workbook is not reloaded.  
Public method UpdateLink Updates a Microsoft Office Excel, DDE, or OLE link (or links).  
Public method WebPagePreview Displays a preview of the workbook as it would look if saved as a Web page.  
Public method XmlImport Imports an XML data file into the current workbook.  
Public method XmlImportXml Imports an XML data stream that has been previously loaded into memory.  
Top

  Name Description
Protected method Dispose Overloaded. Overridden. Releases the unmanaged resources used by the Workbook and optionally releases the managed resources.  
Protected method Finalize  (Inherited from Component.)
Protected method GetObjects
Protected method GetPrimaryControl
Protected method GetService  (Inherited from Component.)
Protected method MemberwiseClone  Overloaded. (Inherited from MarshalByRefObject.)
Protected method OnBindingContextChanged  (Inherited from BindableComponent.)
Top

  Name Description
Public event ActivateEvent Occurs when the workbook is activated. 
Public event AddinInstall Occurs when the workbook is installed as an add-in. 
Public event AddinUninstall Occurs when the workbook is uninstalled as an add-in. 
Public event AfterXmlExport Occurs after Microsoft Office Excel saves or exports data from the workbook to an XML data file. 
Public event AfterXmlImport Occurs after an existing XML data connection is refreshed or after new XML data is imported into the workbook. 
Public event BeforeClose Occurs before the workbook closes. If the workbook has been changed, this event occurs before the user is asked to save changes. 
Public event BeforePrint Occurs before the workbook (or anything in it) is printed. 
Public event BeforeSave Occurs before the workbook is saved. 
Public event BeforeXmlExport Occurs before Microsoft Office Excel saves or exports data from the workbook to an XML data file. 
Public event BeforeXmlImport Occurs before an existing XML data connection is refreshed or before new XML data is imported into the workbook. 
Public event BindingContextChanged  (Inherited from BindableComponent.)
Public event Deactivate Occurs when the workbook is deactivated. 
Public event Disposed  (Inherited from Component.)
Public event New Occurs when a new workbook is created. 
Public event NewSheet Occurs when a new sheet is created in the workbook. 
Public event Open Occurs when the workbook is opened. 
Public event PivotTableCloseConnection Occurs after a PivotTable report closes the connection to its data source. 
Public event PivotTableOpenConnection Occurs after a PivotTable report opens the connection to its data source. 
Public event SheetActivate Occurs when any sheet is activated. 
Public event SheetBeforeDoubleClick Occurs when any worksheet is double-clicked, before the default double-click action. 
Public event SheetBeforeRightClick Occurs when any worksheet is right-clicked, before the default right-click action. 
Public event SheetCalculate Occurs after any worksheet is recalculated or after any changed data is plotted on a chart. 
Public event SheetChange Occurs when cells in any worksheet are changed by the user or by an external link. 
Public event SheetDeactivate Occurs when any sheet is deactivated. 
Public event SheetFollowHyperlink Occurs when you click any hyperlink in a workbook. 
Public event SheetPivotTableUpdate Occurs after the sheet of a PivotTable report has been updated. 
Public event SheetSelectionChange Occurs when the selection changes on any worksheet. Does not occur if the selection is on a chart sheet. 
Public event Shutdown Occurs when the application domain for the assembly is about to unload. 
Public event Startup Occurs after the workbook is running and all the initialization code in the assembly has been run. 
Public event SyncEvent Occurs when the local copy of a worksheet that is part of a Document Workspace is synchronized with the copy on the server. 
Public event WindowActivate Occurs when any workbook window is activated. 
Public event WindowDeactivate Occurs when any workbook window is deactivated. 
Public event WindowResize Occurs when any workbook window is resized. 
Top
Show:
© 2014 Microsoft