Unmerge Cells

Posted

in

by

Are you looking for snippets that will unmerge spreadsheet cells?

Check out below the different snippets to use to unmerge cells with PhpSpreadsheet or Google Sheets API PHP Client.

PhpSpreadsheet (Excel Files)

// Unmerge cells from A1 to D5
$sheet->unmergeCells('A1:D5');

Google Sheets API PHP Client

$requests = [
    new Google_Service_Sheets_Request([
        'ununmergeCells'   => [
            'range'    => ['startRowIndex'=> 1, 'endRowIndex'=> 3, 'startColumnIndex'=> 1, 'endColumnIndex'=> 3],
        ],
    ])
];

$batchUpdateRequest = new Google_Service_Sheets_BatchUpdateSpreadsheetRequest([
    'requests' => $requests
]);

$response = $service->spreadsheets->batchUpdate($spreadsheetId, $batchUpdateRequest);

[you_might_be_interested ids=”58,783″]


Posted

in

by

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Tutorials

Web Dev Tutorials