There was a problem with naming sheets. I unload categories from the database, I want each category to have a separate sheet, I create it without problems, but as soon as it comes to assigning a name to the sheet, there are already problems, first I decided that the maximum length of the name is 30 characters, well, I cut the string to 30 characters , it still does not work, it is worth cutting the line to 10 characters, displays, but the names contain only 5 characters, who faced this problem, how to solve it?
Π’Π°Π±Π»ΠΈΡΠ° ΠΊΠ°ΡΠ΅Π³ΠΎΡΠΈΠΉ 7 Π‘ΠΌΠ΅ΡΠΈΡΠ΅Π»ΠΈ Π½Π° ΡΠ°ΠΊΠΎΠ²ΠΈΠ½Ρ 8 Π‘ΠΌΠ΅ΡΠΈΡΠ΅Π»ΠΈ Π΄Π»Ρ Π²Π°Π½Π½Ρ ΠΈ Π΄ΡΡΠ° 9 ΠΡΡΠ΅Π²ΡΠ΅ ΡΠΈΡΡΠ΅ΠΌΡ 10 ΠΠΎΠΌΠΏΠ»Π΅ΠΊΡΡΡΡΠΈΠ΅ Π΄Π»Ρ Π΄ΡΡΠ° 11 Π‘ΠΌΠ΅ΡΠΈΡΠ΅Π»ΠΈ Π΄Π»Ρ ΠΊΡΡ
Π½ΠΈ 12 Π‘ΠΈΡΠΎΠ½Ρ ΠΈ Π΄ΠΎΠ½Π½ΡΠ΅ ΠΊΠ»Π°ΠΏΠ°Π½Ρ 13 Π‘ΠΌΠ΅ΡΠΈΡΠ΅Π»ΠΈ Π΄Π»Ρ Π³ΠΈΠ³ΠΈΠ΅Π½ΠΈΡΠ΅ΡΠΊΠΎΠ³ΠΎ Π΄ΡΡΠ° 14 ΠΠΊΡΠ΅ΡΡΡΠ°ΡΡ 15 ΠΠΎΠ»ΠΎΡΠ΅Π½ΡΠ΅ΡΡΡΠΈΡΠ΅Π»ΠΈ 16 Π‘ΠΌΠ΅ΡΠΈΡΠ΅Π»ΠΈ Π½Π° Π±ΠΎΡΡ Π²Π°Π½Π½Ρ 17 Π‘ΠΌΠ΅ΡΠΈΡΠ΅Π»Ρ Π΄Π»Ρ Π±ΠΈΠ΄Π΅ Code itself
$r=$this->get_typ(); $is=0; foreach ($r as $res){ if ($is!=0){ $objPHPExcel->createSheet(); $objPHPExcel->setActiveSheetIndex($is); $active_sheet = $objPHPExcel->getActiveSheet(); } $is++; $str=substr($res['nazv'], 0, 10); $active_sheet->setTitle($str);