Allows to specify custom sheets from X to Y

Namespace:  SautinSoft
Assembly:  UseOffice (in UseOffice.dll) Version: 4.3.12.15

Syntax

      
 C#  Visual Basic 
public void Range(
	int fromSheetNum,
	int toSheetNum
)
Public Sub Range ( _
	fromSheetNum As Integer, _
	toSheetNum As Integer _
)

Parameters

fromSheetNum
Int32
Start number
toSheetNum
Int32
End number

Examples

CopyC#
SautinSoft.UseOffice u = new UseOffice();
if (u.InitExcel() == 0)
{
    u.Sheets.Range(5,7);
    u.ConvertFile(@"D:\Workbook.xlsx", @"d:\Result.pdf", UseOffice.eDirection.XLSX_to_PDF);
    //Make other conversions ....
    u.CloseExcel();
}
CopyVB.NET
Dim u As SautinSoft.UseOffice = New UseOffice()
If u.InitExcel() = 0 Then
    u.Sheets.Range(5,7)
    u.ConvertFile("D:\Workbook.xlsx", "d:\Result.pdf", UseOffice.eDirection.XLSX_to_PDF)
    'Make other conversions ....
    u.CloseExcel()
End If

See Also