It is necessary to combine the columns, the number of which, for example, 10 (can change dynamically).

I found an example in the docks:

$objPHPExcel->getActiveSheet()->mergeCells('A1:C1'); 

But I do not know the letter of the last column.

How can you combine columns, knowing only their number?

  • Calculate the letter of the final column, knowing the initial one. - u_mulder
  • $ i = 10; $ objPHPExcel-> getActiveSheet () -> mergeCells ('A1:'. $ i. '1'); - Sergey
  • this option, for some reason, does not work - Sergey
  • Naturally, $i is a number. Do you understand the difference between a number and a letter? - u_mulder
  • one
    The alphabet is generated in range('A', 'Z') - u_mulder

0