See Also

IWorkbookSet Interface  | IWorkbookSet Members  | ReadVBA Property

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Languages SpreadsheetGear The Performance Spreadsheet Component Company 

ReadObjects Property

SpreadsheetGear Namespace > IWorkbookSet Interface : ReadObjects Property

Gets or sets the property which specifies whether charts, pictures and drawing objects should be read when reading a workbook.

[Visual Basic]
Overridable Property ReadObjects As Boolean
[C#]
virtual bool ReadObjects {get; set;}
[C++]
__property virtual bool get_ReadObjects(); __property virtual void set_ReadObjects(    bool value );
[C++/CLI]
virtual property bool ReadObjects {    bool get();    void set (bool value); }

Remarks

Charts, pictures and drawing objects are read and written by default. Set this property to false to disable reading of charts, pictures and drawing objects when a workbook is read.

Note that setting ReadDrawingObjects to false will not disable reading of chart sheets.

Example

[C#] 

using System; 
using SpreadsheetGear; 
  
namespace ConsoleApplication 

    /// <summary> 
    /// Demonstrate a custom function which sums the range of cells or values passed to it. 
    /// </summary> 
    class Program 
    { 
        static void Main(string[] args) 
        { 
            // Create a new empty workbook. 
            IWorkbookSet workbookSet = Factory.GetWorkbookSet(); 
  
            // Set to not read VBA or Objects (shapes). 
            workbookSet.ReadVBA = false; 
            workbookSet.ReadObjects = false; 
  
            // Read MyWorkbook.xls without VBA or objects. 
            IWorkbook workbook = workbookSet.Workbooks.Open("MyWorkbook.xls"); 
        } 
    } 

    

[Visual Basic] 

Imports System
Imports SpreadsheetGear


Namespace ConsoleApplication
    _
    ' Demonstrate reading a workbook without VBA or objects (shapes).
    Class Program

        Public Overloads Shared Sub Main()
            ' Create a new empty workbook.
            Dim workbookSet As IWorkbookSet = Factory.GetWorkbookSet()

            ' Set to not read VBA or Objects (shapes).
            workbookSet.ReadVBA = False
            workbookSet.ReadObjects = False

            ' Read MyWorkbook.xls without VBA or objects.
            Dim workbook As IWorkbook = workbookSet.Workbooks.Open("MyWorkbook.xls")
        End Sub 'Main
    End Class 'Program
End Namespace 'ConsoleApplication

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IWorkbookSet Interface  | IWorkbookSet Members  | ReadVBA Property

 

 


See our live Excel Reporting, Excel Charting, Excel to DataGrid and Excel Calculation Samples.

Copyright © 2003-2007 SpreadsheetGear LLC. All Rights Reserved.

SpreadsheetGear and Spreadsheet Gear are trademarks of SpreadsheetGear LLC.