Php 中的分页预览

Aspose.Cells - 分页预览

将工作表设置为分页预览使用Aspose.Cells Java for PHP 只需调用分页预览模块。

PHP代码

 //Instantiating a Excel object by 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");

下载运行代码

下载**分页预览 (Aspose.Cells)**来自以下任何社交编码网站: