66use PhpOffice \PhpSpreadsheet \Calculation \Engine \Logger ;
77use PhpOffice \PhpSpreadsheet \Calculation \Token \Stack ;
88use PhpOffice \PhpSpreadsheet \Cell \Cell ;
9+ use PhpOffice \PhpSpreadsheet \Cell \Coordinate ;
910use PhpOffice \PhpSpreadsheet \NamedRange ;
1011use PhpOffice \PhpSpreadsheet \Shared ;
1112use PhpOffice \PhpSpreadsheet \Spreadsheet ;
@@ -3491,11 +3492,11 @@ private function processTokenStack($tokens, $cellID = null, Cell $pCell = null)
34913492 $ oData = array_merge (explode (': ' , $ operand1Data ['reference ' ]), explode (': ' , $ operand2Data ['reference ' ]));
34923493 $ oCol = $ oRow = [];
34933494 foreach ($ oData as $ oDatum ) {
3494- $ oCR = Cell ::coordinateFromString ($ oDatum );
3495- $ oCol [] = Cell ::columnIndexFromString ($ oCR [0 ]) - 1 ;
3495+ $ oCR = Coordinate ::coordinateFromString ($ oDatum );
3496+ $ oCol [] = Coordinate ::columnIndexFromString ($ oCR [0 ]) - 1 ;
34963497 $ oRow [] = $ oCR [1 ];
34973498 }
3498- $ cellRef = Cell ::stringFromColumnIndex (min ($ oCol )) . min ($ oRow ) . ': ' . Cell ::stringFromColumnIndex (max ($ oCol )) . max ($ oRow );
3499+ $ cellRef = Coordinate ::stringFromColumnIndex (min ($ oCol )) . min ($ oRow ) . ': ' . Coordinate ::stringFromColumnIndex (max ($ oCol )) . max ($ oRow );
34993500 if ($ pCellParent !== null ) {
35003501 $ cellValue = $ this ->extractCellRange ($ cellRef , $ this ->spreadsheet ->getSheetByName ($ sheet1 ), false );
35013502 } else {
@@ -3564,11 +3565,11 @@ private function processTokenStack($tokens, $cellID = null, Cell $pCell = null)
35643565 foreach (array_keys ($ rowIntersect ) as $ row ) {
35653566 $ oRow [] = $ row ;
35663567 foreach ($ rowIntersect [$ row ] as $ col => $ data ) {
3567- $ oCol [] = Cell ::columnIndexFromString ($ col ) - 1 ;
3568+ $ oCol [] = Coordinate ::columnIndexFromString ($ col ) - 1 ;
35683569 $ cellIntersect [$ row ] = array_intersect_key ($ operand1 [$ row ], $ operand2 [$ row ]);
35693570 }
35703571 }
3571- $ cellRef = Cell ::stringFromColumnIndex (min ($ oCol )) . min ($ oRow ) . ': ' . Cell ::stringFromColumnIndex (max ($ oCol )) . max ($ oRow );
3572+ $ cellRef = Coordinate ::stringFromColumnIndex (min ($ oCol )) . min ($ oRow ) . ': ' . Coordinate ::stringFromColumnIndex (max ($ oCol )) . max ($ oRow );
35723573 $ this ->debugLog ->writeDebugLog ('Evaluation Result is ' , $ this ->showTypeDetails ($ cellIntersect ));
35733574 $ stack ->push ('Value ' , $ cellIntersect , $ cellRef );
35743575
@@ -4103,7 +4104,7 @@ public function extractCellRange(&$pRange = 'A1', Worksheet $pSheet = null, $res
41034104 }
41044105
41054106 // Extract range
4106- $ aReferences = Cell ::extractAllCellReferencesInRange ($ pRange );
4107+ $ aReferences = Coordinate ::extractAllCellReferencesInRange ($ pRange );
41074108 $ pRange = $ pSheetName . '! ' . $ pRange ;
41084109 if (!isset ($ aReferences [1 ])) {
41094110 // Single cell in range
@@ -4158,7 +4159,7 @@ public function extractNamedRange(&$pRange = 'A1', Worksheet $pSheet = null, $re
41584159 if ($ namedRange !== null ) {
41594160 $ pSheet = $ namedRange ->getWorksheet ();
41604161 $ pRange = $ namedRange ->getRange ();
4161- $ splitRange = Cell ::splitRange ($ pRange );
4162+ $ splitRange = Coordinate ::splitRange ($ pRange );
41624163 // Convert row and column references
41634164 if (ctype_alpha ($ splitRange [0 ][0 ])) {
41644165 $ pRange = $ splitRange [0 ][0 ] . '1: ' . $ splitRange [0 ][1 ] . $ namedRange ->getWorksheet ()->getHighestRow ();
@@ -4170,10 +4171,10 @@ public function extractNamedRange(&$pRange = 'A1', Worksheet $pSheet = null, $re
41704171 }
41714172
41724173 // Extract range
4173- $ aReferences = Cell ::extractAllCellReferencesInRange ($ pRange );
4174+ $ aReferences = Coordinate ::extractAllCellReferencesInRange ($ pRange );
41744175 if (!isset ($ aReferences [1 ])) {
41754176 // Single cell (or single column or row) in range
4176- list ($ currentCol , $ currentRow ) = Cell ::coordinateFromString ($ aReferences [0 ]);
4177+ list ($ currentCol , $ currentRow ) = Coordinate ::coordinateFromString ($ aReferences [0 ]);
41774178 if ($ pSheet ->cellExists ($ aReferences [0 ])) {
41784179 $ returnValue [$ currentRow ][$ currentCol ] = $ pSheet ->getCell ($ aReferences [0 ])->getCalculatedValue ($ resetLog );
41794180 } else {
@@ -4183,7 +4184,7 @@ public function extractNamedRange(&$pRange = 'A1', Worksheet $pSheet = null, $re
41834184 // Extract cell data for all cells in the range
41844185 foreach ($ aReferences as $ reference ) {
41854186 // Extract range
4186- list ($ currentCol , $ currentRow ) = Cell ::coordinateFromString ($ reference );
4187+ list ($ currentCol , $ currentRow ) = Coordinate ::coordinateFromString ($ reference );
41874188 if ($ pSheet ->cellExists ($ reference )) {
41884189 $ returnValue [$ currentRow ][$ currentCol ] = $ pSheet ->getCell ($ reference )->getCalculatedValue ($ resetLog );
41894190 } else {
0 commit comments