PHP code example of aspose / cells

1. Go to this page and download the library: Download aspose/cells library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aspose / cells example snippets



re_once("aspose.cells.php");
 
use aspose\cells;
use aspose\cells\Workbook;
use aspose\cells\CellsHelper;
use aspose\cells\Color;
 
$workbook = new Workbook();
$workbook->getWorksheets()->get("Sheet1")->getCells()->get("A1")->putValue("testing...");
$workbook->save("result.xlsx");
 
echo aspose\cells\BorderType::BOTTOM_BORDER;
echo "\n";
 
echo "CellsHelper version: ".CellsHelper::getVersion();
echo "\n";


re_once("aspose.cells.php");
 
use aspose\cells;
use aspose\cells\Workbook;
use aspose\cells\PdfSaveOptions;
 
$workbook = new Workbook("example.xlsx");
$saveOptions = new PdfSaveOptions();
$saveOptions->setOnePagePerSheet(true);
$workbook->save("example.pdf", $saveOptions);