Skip to content

Instantly share code, notes, and snippets.

@onocom
Last active October 16, 2015 02:20
Show Gist options
  • Save onocom/8e72386214a5675b2a9a to your computer and use it in GitHub Desktop.
Save onocom/8e72386214a5675b2a9a to your computer and use it in GitHub Desktop.
【PHPExcel】セル番地を数値で取得するための試行錯誤
<?php
// PHPExcel_Cell::rangeBoundaries
var_dump(PHPExcel_Cell::coordinateFromString("A1")); // array("A","1");
var_dump(PHPExcel_Cell::getRangeBoundaries("A1:Z1")); // array( array("A","1"),array("Z","1")
var_dump(PHPExcel_Cell::rangeBoundaries("A1:BA1")); // array( array(1, "1"),array(53, "1"))
var_dump(PHPExcel_Cell::rangeBoundaries("B2:BA3")); // array( array(2, "2"),array(53, "3"))
var_dump(PHPExcel_Cell::rangeBoundaries("AF10")); // array( array(32, "10"),array(32, "10"))
var_dump(PHPExcel_Cell::rangeDimension("A1:BA1")); // array( 53, 1 )
var_dump(PHPExcel_Cell::rangeDimension("B2:BA3")); // array( 52, 2 )
var_dump(PHPExcel_Cell::splitRange("A1:BA1,AF2")); // array( array("A1","BA1"), array("AF2") )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment