Category : phpspreadsheet

When I try to export datas as excel file on the specific request I got below error PhpOfficePhpSpreadsheetReaderException Failed to load path_to_projectstorageframeworklaravel-excellaravel-excel-pz23rYwVENIOZUw7vnvhKaNjUkkNLNT8.html as a DOM Document I search alot but couldnot find any answer, the problem comes only when semester = First Sem but when semester is second, third etc this error doesn’t come and ..

Read more

Im using PHP Spreadsheet in Laravel and i need to show list of states in dropdown,Im not able to show states once 255 character limit is passed ,I searched in Stackoverflow but every answer is not helpful and confusing,Can anyone explain how i can exceed character limit ? $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet(); ..

Read more

I have installed PHPSpreadSheet on my local machine and it is working fine. After that I push my changes to remote server via Gitlab repository but I faced the below problem: Root composer.json requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0]. phpoffice/phpspreadsheet 1.15.0 requires ext-gd * -> it is missing from your system. Install or enable ..

Read more

Hi I’m using maatwebsite/excel Library and want to disable calculation / resolution of named formulas when importing the Excel file. because it throws an error and the process stops, while File has a formula value of 0 in the list. I fixed this in the vendor class by moving !empty to isset in Validate Date ..

Read more

I am getting list of data in array and i want to write this array data in specific sheet of excel file "gp_name". I am able to load the excel sheet but how can i write my array data in that specific sheet with headers? this is i tried: $gpsData=$gps->toArray(); $headers=[‘id’,’name’,’odiya_name’,’block_id’,’is_acim’,’is_dss’,’is_urban’, ‘deleted_at’,’created_at’,’updated_at’,’other_names’]; $spreadsheet = new ..

Read more

Currently, I am exporting an excel sheet using maatwebsite 3.1 export in laravel 5.6. I am using phpspreadsheet concepts for conditional formatting $conditional_fico = new PhpOfficePhpSpreadsheetStyleConditional(); $conditional_fico->setConditionType(PhpOfficePhpSpreadsheetStyleConditional::CONDITION_CELLIS) ->setOperatorType(PhpOfficePhpSpreadsheetStyleConditional::OPERATOR_LESSTHAN) ->addCondition(‘700’); $conditional_fico->getStyle()->getFont()->getColor()->setARGB(PhpOfficePhpSpreadsheetStyleColor::COLOR_RED); $conditionalStyles = $event->sheet->getStyle(‘G:G’)->getConditionalStyles(); $conditionalStyles[] = $conditional_fico; $event->sheet->getStyle(‘G:G’)->setConditionalStyles($conditionalStyles); Now i want to Change the color of A:A if respective G:G is less than 700. Example : ..

Read more

In PhpSpreadsheet load excel template then write data then export to new excel file by downloading. $spreadsheet = IOFactory::load(‘assets/template.xlsx’); $spreadsheet->getActiveSheet() ->setCellValue(‘A5’, “No”) ->setCellValue(‘B5’, “Name”) ->setCellValue(‘C5’, “Email”) ->setCellValue(‘D5’, “Phone”) ->setCellValue(‘E5’, “Address”); $writer = IOFactory::createWriter($spreadsheet, “Xlsx”); $writer->save(“template.xlsx”); This saves the new excel file in public folder, now I need to download the excel. Source: Laravel Sta..

Read more