Export WORKBOOK to JPG from Excel

PHP library for exporting WORKBOOK to JPG file

Use Export API of Cells Cloud to export Excel file internal object workflows in PHP. This is a professional solution to export WORKBOOK to JPG format file from spreadsheet online using PHP.

Export WORKBOOK object to JPG format file using Cells Cloud SDK for PHP

API
POST
https://api.aspose.cloud/v3.0/cells/export

Export WORKBOOK object to JPG file from Excel file is a complex task. Export WORKBOOK to JPG format transitions is performed by our PHP SDK while maintaining the source WORKBOOK spreadsheet's main structural and logical content. Our PHP library is a professional solution to export WORKBOOK objects to JPG format files online. This Cloud SDK gives PHP developers powerful functionality and perfect JPG output.

Code example in PHP using REST API to export WORKBOOK to JPG format from spreadsheet

// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-php/
    <?php
    require_once('vendor\autoload.php');
    use \Aspose\Cells\Cloud\Api\LightCellsApi;
    $cells = new LightCellsApi( getenv("ProductClientId"),getenv("ProductClientSecret") );
    $files = array (
        'DataSource' =>  "C:/datasource.xlsx",
        'AssemblyTest' => "C:/assemblytest.xlsx"
    );
    $result = $cells->postExport( $files,'workbook', 'jpg' );
    $filename = $result->getFiles()[0]->getFilename() ;
    $fileData = $result->getFiles()[0]->getFileContent() ;
    $ptr = fopen($filename, 'wb');
    fwrite($ptr, base64_decode($fileData));
    fclose($ptr);

How to use Cells Cloud SDK for PHP to export objects from Excel WORKBOOK to JPG

  1. Register an account at Dashboard to get free API quota & authorization details
  2. Initialize the Cells API with your Client ID, Client Secret, Base URL, and API version.
  3. Use the `postExport` method to retrieve the resulting stream.

System Requirements

  1. PHP 7.4 or newer