Excel to PDF Conversion in PHP

Aspose.Cells - Excel to PDF Conversion

Convert Microsoft Excel file to PDF

PHP Code

$dataDir = '';

// Create Aspose.Cells helper object
$ptr = new \COM('Aspose.Cells.Interop.InteropHelper');

// Opening through path
// Creating a Workbook object and opening an Excel file using its file path
$workbook = $ptr->New("Aspose.Cells.Workbook", array($dataDir . '/Book1.xls'));

$ptr->Call($workbook, "Save", array($dataDir . "/outBook1.pdf"));

print "Conversion Completed" . PHP_EOL;

Download Sample Code

Download Excel to PDF Conversion (Aspose.Cells) from any of the social coding sites mentioned below: