Здравствуйте, вопрос к тем, кто работает с библиотекой PhpSpreadsheet. Реализовываю экспорт в Excel с помощью библиотеки PhpSpreadsheet. Я заметил, что если в setUrl() вставить переменную, то выдаёт ошибку, а если строку, то всё идёт нормально. В интернете решения не нашёл. Кто сталкивался с такой проблемой и находил её решение, то просьба помочь. PHP: <?phprequire '../vendor/autoload.php';use PhpOffice\PhpSpreadsheet\Spreadsheet;use PhpOffice\PhpSpreadsheet\Writer\Xlsx;$bd=new Mysqli("localhost", "root", "", "project");$postnames = $_POST['1'];$query=$bd->query("SELECT FIO_student, email, date_sign_project, birthday, age, location_user, Educational_organization, FIO_parent, phone_parent, phone_user, link_vk, familiarized, link_motivation, folder_user_project_sign FROM registrationproject WHERE joinNameAndDateProject='$postnames'");$count=2;$spreadsheet = new Spreadsheet();while ($result=$query->fetch_assoc()){ $count++; $openFolder=opendir("..".$result{'folder_user_project_sign'}."\""); while (false !== ($dirFolder=readdir($openFolder))){ if ($dirFolder!= "." && $dirFolder!= "..") { $dirFolder2=$dirFolder; $sumdirFolder.= $dirFolder2.', '; }} $sheet = $spreadsheet->getActiveSheet();$sheet->setCellValue('A'.$count, $result{'FIO_student'});$sheet->setCellValue('B'.$count, $result{'email'});$sheet->setCellValue('C'.$count, $result{'phone_user'});$sheet->setCellValue('D'.$count, $result{'date_sign_project'});$sheet->setCellValue('E'.$count, $result{'birthday'});$sheet->setCellValue('F'.$count, $result{'age'});$sheet->setCellValue('G'.$count, $result{'location_user'});$sheet->setCellValue('H'.$count, $result{'Educational_organization'});$sheet->setCellValue('I'.$count, $result{'FIO_parent'});$sheet->setCellValue('J'.$count, $result{'phone_parent'});$sheet->setCellValue('K'.$count, $result{'link_vk'});$sheet->setCellValue('L'.$count, $result{'phone_parent'});$sheet->setCellValue('M'.$count, $result{'familiarized'});$sheet->setCellValue('N'.$count, $result{'link_motivation'});$sheet->setCellValue('O'.$count, $sumdirFolder);$spreadsheet->getActiveSheet()->setCellValue('K'.$count, $result{'link_vk'});$spreadsheet->getActiveSheet()->getCell('K'.$count)->getHyperlink()->setUrl($result{'link_vk'});};$writer = new Xlsx($spreadsheet);$writer->save('hello world.xlsx'); ?>
Какую ошибку? Спойлер --- Добавлено --- Заодно проверьте содержимое $result['link_vk'] и сравните с подставляемой "строкой"