SpreadsheetGear Namespace > IWorkbookSet Interface : ReadObjects Property |
'Declaration
Property ReadObjects As System.Boolean
'Usage
Dim instance As IWorkbookSet Dim value As System.Boolean instance.ReadObjects = value value = instance.ReadObjects
System.bool ReadObjects {get; set;}
read-write property ReadObjects: System.Boolean;
function get,set ReadObjects : System.boolean
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.
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"); } } }
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
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2