• Как сделать переход колонок в phpspreadsheets?

    @Popkovvvv Автор вопроса
    BD_ l3ftoverZ!, foreach ($data as $comp) {
    foreach ($titles as $title) {
    $columnArray = array_chunk($titles, 1);
    //Левые титулы
    $spreadsheet
    ->getActiveSheet()
    ->fromArray(
    $columnArray,
    NULL,
    'B' . $row)
    ->getStyle('B9' . $row)->applyFromArray($left_title);

    }

    $companyArray = array_chunk($comp, 1);
    $spreadsheet->getActiveSheet()
    ->fromArray(
    $companyArray,
    NULL,
    $cell[$i] . $row_c);
    $drawing = new Drawing();
    $drawing->setName('Logo');
    $drawing->setDescription('Logo');
    $drawing->setPath('images/' . $company_image[$i] . '.png');
    $drawing->setHeight(40);
    $drawing->setCoordinates($cell[$i] . $row);
    $drawing->setWorksheet($spreadsheet->getActiveSheet());
    $spreadsheet->getActiveSheet()->getStyle('B9:' . $cell[$i] . '22')->applyFromArray($borderStyle);
    $spreadsheet->getActiveSheet()->getStyle('C9:' . $cell[$i] . '9')->applyFromArray($styleRow);
    $spreadsheet->getActiveSheet()->getStyle('C10:' . $cell[$i] . '10')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);
    $spreadsheet->getActiveSheet()->getStyle('C10:' . $cell[$i] . '10')->getAlignment()->setVertical(Alignment::VERTICAL_TOP);
    $spreadsheet->getActiveSheet()->getStyle('C10:' . $cell[$i] . '10')->getFont()->setBold(true);
    $spreadsheet->getActiveSheet()->getStyle('C10:' . $cell[$i] . '10')->getFont()->setSize(13);

    $i++;

    };