Page Break Preview in PHP

Aspose.Cells - Page Break Preview

To set a worksheet to page break preview using Aspose.Cells Java for PHP, simply invoke the PageBreakPreview module.

PHP Code

// Instantiating an Excel object using the Excel file path
$workbook = new Workbook($dataDir . "book1.xls");

// Adding a new worksheet to the Workbook object
$worksheets = $workbook->getWorksheets();

$worksheet = $worksheets->get(0);

// Displaying the worksheet in page break preview
$worksheet->setPageBreakPreview(true);

// Saving the modified Excel file in default format
$workbook->save($dataDir . "output.xls");

Download Running Code

Download Page Break Preview (Aspose.Cells) from any of the below mentioned social coding sites: