File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,13 @@ public static function getSheet(Event $event): Worksheet
2323 return $ sheet ;
2424 }
2525
26+ public static function getSheetMaxRowAndColumn (Event $ event ): array
27+ {
28+ $ sheet = Excel::getSheet ($ event );
29+
30+ return $ sheet ->getHighestRowAndColumn ();
31+ }
32+
2633 /**
2734 * 处理导入数据的计算属性
2835 *
@@ -36,7 +43,7 @@ public static function handleCalculateSheet(Event $event)
3643 {
3744 $ sheet = Excel::getSheet ($ event );
3845
39- ['row ' => $ maxRow , 'column ' => $ maxColName ] = $ sheet -> getHighestRowAndColumn ( );
46+ ['row ' => $ maxRow , 'column ' => $ maxColName ] = Excel:: getSheetMaxRowAndColumn ( $ event );
4047
4148 // A=65
4249 $ maxCol = ord ($ maxColName ) - 64 ;
@@ -153,7 +160,7 @@ public static function handleRequireCellTextColorForRedAndHyperLink(Event $event
153160 {
154161 $ sheet = Excel::getSheet ($ event );
155162
156- ['row ' => $ maxRow , 'column ' => $ maxColName ] = $ sheet -> getHighestRowAndColumn ( );
163+ ['row ' => $ maxRow , 'column ' => $ maxColName ] = Excel:: getSheetMaxRowAndColumn ( $ event );
157164
158165 // A=65
159166 $ maxCol = ord ($ maxColName ) - 64 ;
You can’t perform that action at this time.
0 commit comments