0)) { $result = ""; while ($num > 36) { $digit = floor($num / 36); $result .= chr(64+$digit); $num -= $digit*36; } $result .= chr(64+$num); return $result; } return false; } Получение содержания из колонок Excel в массив $xls = PHPExcel_IOFactory::load($fileAddress); $xls->setActiveSheetIndex(0); $sheet = $xls->getActiveSheet(); $continue = true; $maxX = 10;$maxY = 10; $maxXreal = 1;$maxYreal = 1; $reLine = false; do { $re = false; $x = 1;$y = 1; while ($continue) { if ((($elementText = ($sheet->getCell(self::excelColByNum($x).$y)."")) != "") and 1) { if ($x > $maxXreal) {/*echo "[1-$x]";*/$maxXreal = $x;$maxX = $x + 10;if ($y > 1) {$re = true;$reLine = $y - 1;}} if ($y > $maxYreal) {/*echo "[2-$x]";*/$maxYreal = $y;$maxY = $y + 10;} // if ($x > ($maxX-10)) {echo "[3-$x]";$maxX = $x + 10;}//$maxX = $x + 10; // if ($y > ($maxY-10)) {echo "[4-$x]";$maxY = $y + 10;}//$maxY = $y + 10; // var_dump($sheet->getCell(self::excelColByNum($x).$y)."");//$sheet->getCell } //var_dump($x);var_dump($y); $x++; if (($re === false) and ($y == $reLine)) {$continue = false;} elseif (($x > $maxX) and ($y > $maxY)) {$continue = false;} elseif ($x > $maxX) {$y++;$x=1;} } } while ($re); //echo "E"; //var_dump($maxXreal);var_dump($maxYreal); $excelDataAr = array(); for ($y=1;$y<=$maxYreal;$y++) { for ($x=1;$x<=$maxXreal;$x++) { if (!isset($excelDataAr[$y-1])) {$excelDataAr[$y-1] = array();} $excelDataAr[$y-1][$x-1] = $sheet->getCell(self::excelColByNum($x).$y).""; } } // var_dump($excelDataAr);exit; // $excelDataAr = $sheet->toArray();echo 7; if (is_array($excelDataAr) and ($count = count($excelDataAr))) {//Возможно в проверке на массив нет необходимости