'Declaration
<DefaultMemberAttribute("Item")> Public Class WorksheetCollection Inherits WorkbookElement
'Usage
Dim instance As WorksheetCollection
[DefaultMember("Item")] public class WorksheetCollection : WorkbookElement
'Declaration
<DefaultMemberAttribute("Item")> Public Class WorksheetCollection Inherits WorkbookElement
'Usage
Dim instance As WorksheetCollection
[DefaultMember("Item")] public class WorksheetCollection : WorkbookElement
using( var doc = Workbook.Load( "test.xlsx") ) // Loads an existing Workbook named “test.xlsx”. { var worksheetA = doc.Worksheets[ 1 ]; // Gets the second worksheet. var worksheetB = doc.Worksheets[ “Sheet3” ]; // Gets the worksheet named “Sheet3”. doc.Worksheets.Add(); // Adds a new Worksheet. doc.Worksheets.Add( "ThirdSheet" ); // Adds a new Worksheet with a specific name. if( doc.Worksheets.Contains( "ThirdSheet" ) ) // Looks for a specific Worksheet. { Debug.WriteLine( "Found" ); } doc.Save(); }
System.Object
Xceed.Workbooks.NET.WorkbookElement
Xceed.Workbooks.NET.WorksheetCollection
Target Platforms: Windows 11, Windows 10, 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