Questions tagged [phpexcel]

Introducing a versatile PHP toolbox designed to effortlessly generate, view, modify, and save spreadsheet documents compatible with MS Excel and various other spreadsheet applications.

Converting a float to an integer for dates in PHP with CodeIgniter

$row['A'] contains 13/03/2019 Converting Excel date to PHP: PHPExcel_Shared_Date::ExcelToPHP(trim($row['A'])); This operation returns a float value However, the date() function in PHP requires an integer Converting Excel date to Y-m ...

Error message: The class 'PhpOfficePhpSpreadsheetSpreadsheet' could not be located within the context of Codeigniter

I seem to be having an issue with using phpspreadsheet in codeigniter. Below is the snippet of the code causing the problem: use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; public function modif ...

PHPExcel script experiencing significant delays

I have a task to write data to an Excel sheet using PHPExcel. The resulting file is quite large, with 500 lines and around 35 columns. However, the script takes more than two minutes to run. Is there any way to optimize this process? Thank you for your hel ...

Looking to adjust the timestamp format in Excel? The format change may appear correct, but the date may not

$my = '13/02/2022 21:29:30'; $converted = date('d M Y h.i.s A', strtotime($my)); $reversed = date('d-m-Y H:i:s', strtotime($converted)); echo $reversed; // the current output is `01-01-1970 00:00:00` which is incorrect // I a ...

Downloading Excel files in Angular using File Saver

Previously, I had set up a PHP post form that would download an excel file upon clicking the button. The form data was also posted to the URL successfully using plain HTML and submit form. This is the function in PHP that gets triggered when the form is p ...

Laravel 5 is known for experiencing a frustrating "This site can't be reached" error message when attempting to download a file

I am experiencing an issue with my Laravel 5.2 and PHP7 setup on my hosting server. Everything seems to be working fine, except for the links that are supposed to generate and download xlsx files using Laravel Excel. Whenever I click on these links, I enco ...

Change the font color within a single cell using PHPExcel

Is there a way to change the text color within one cell using PHPExcel? I've searched for information but can't find any. Is it even possible? I know it can be done manually in Excel, but is there a way to achieve this through programming with PHPExcel? ...

Transferring data from a PhoneGap application to an XLS file and attaching it to an email for easy sharing

Is there any example available that demonstrates how to achieve the following functionality in Phonegap? My app retrieves data through AJAX from our server. I would like users to be able to export these results to an Excel spreadsheet which can then be at ...

Phpexcel generates incorrect file format

Here is a simple code snippet for creating an xlsx file and opening it with OpenOffice: require(APPPATH.'/PHPExcel-1.8/Classes/PHPExcel.php'); require(APPPATH.'/PHPExcel-1.8/Classes/PHPExcel/Writer/Excel2007.php'); $this->load-> ...

There is a lack of data loading in an Excel file when using the PHPExcel library

What I am looking for: When the Export Tab is clicked, I want data from the database to be loaded into an Excel file in formats such as CSV and XLS. The Issue I Am Facing: After executing the file, no data is loaded into the Excel File. Here is a sni ...