NativeExcel for .Net Developer's Reference

IWorksheet.Previous Property

Returns an IWorksheet interface that represents the previous worksheet.

[Visual Basic]
Property ReadOnly Previous As IWorksheet
[C#]
IWorksheet Previous { get; }
[C++]
__property IWorksheet* get_Previous();
[JScript]
function get Previous() : IWorksheet

Property Value

IWorksheet interface.

Example

This example displays the name of the previous worksheet.

[C#]
if (sheet.Previous != null) {
   System.Console.WriteLine(sheet.Previous.Name); 
}   
[Visual Basic]
If Not sheet.Previous Is Nothing Then
   System.Console.WriteLine(sheet.Previous.Name) 
End If
[C++]
if (sheet->Previous != null) {
   System::Console::WriteLine(sheet->Previous->Name); 
}   

See Also

IWorksheet Interface | NativeExcel Namespace | Next Property