Aspose.Cells - Printing Workbooks

Printing Worksheet
//Instantiate a new workbook
Workbook book = new Workbook("data/AsposeDataInput.xls");

//Create an object for ImageOptions
ImageOrPrintOptions  imgOptions = new ImageOrPrintOptions ();

//Get the first worksheet
Worksheet sheet = book.getWorksheets().get(0);

//Create a SheetRender object with respect to your desired sheet
SheetRender sr = new SheetRender(sheet, imgOptions);

//Print the worksheet  
sr.toPrinter("Samsung ML-1520 Series");

Printing Workbook
//Create a WorkbookRender object with respect to your workbook
WorkbookRender wr = new WorkbookRender(book, imgOptions);

//Print the workbook  
wr.toPrinter("Samsung ML-1520 Series");


Download Source Code

For More Examples, visit Aspose Docs

Last edited Aug 11, 2014 at 12:39 PM by shoaibkhan, version 1