PhpSpreadsheet is a library written in pure PHP and providing a set of classes that allow you to read from and to write to different spreadsheet file formats, like Excel and LibreOffice Calc.
Trying to change the background color of the sheet title with PHPSpreadsheet.
No success with something like
`$sheet ->getTitle($sheet1)->getStyle()->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID);`
How would you address…
I am on the fact-finding part of our project specs and have not found a definitive answer re whether PHPSpreadsheet can convert an .xls to .xlsx and preserve formatting, such as table borders.
From this question, I see that there are separate…
I try to read a spreadsheet however when there is only numbers in a cell, it puts them as .0 digits, ie, if the cell value is 123, it reads it as 123.0 int. Is there a way to read them as raw string?
try {
$inputFileType =…
This question is for the developers of phpexcel/phpspreadsheet.
We are currently using the library on our website to generate excel files (obviously) and are currently in the process of getting SOC2 certified; which requires us to run all our code…
I am using PHPSpreadsheet to create a line chart.
Is there anywhere that I can set the minor or major coordinates on a series?
I have read the documentation and can't find the method. Thanks
I am using PhpSpreadsheet to read files (csv, xls, xlsx).
But when I reading csv files, the content of Chinese word can't read (it's null).
enter image description here
This csv file:
enter image description here
This is my code:
The value of Cell C13 is: 01/02/2018 and i need to get same result on output but:
If using $d_calib = $spreadsheet->setActiveSheetIndex(2)->getCell( 'C13' )->getValue(); the result is: 42010
also if echo $d_calib =…
Problem:
The created (XLSX) file is send to email and works well but it doesn't not open when I download it using this script, MS Excel shows "invalid file format or extension" error.
I wrote a script to force download an excel file from the server…
I'm migrating my app from PhpExcel to PhpSpreadsheet. Is there a replacement for setZipClass? I can't find it in the documentation. Below is the line that I'm trying to update.
PHPExcel_Settings::setZipClass(PHPExcel_Settings::ZIPARCHIVE);
I have never used Composer, but I want to use PHPSpreadsheet package, and it is recommended that Composer is used.
I am on a MAC using XAMPP and Netbeans.
I have installed Composer, and I have run the following command to get and install the…
I'm working with phpspreadsheet. In a part of my code I have to generate a html-object:
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
$writer->save($fileNameHTML);
$html = file_get_contents($fileNameHTML);
I need a function…
I'm new to PhpSpreadSheet, and I'd like to know if there is a way to load a CSV into a specific WorkSheet ?
I tried the code bellow but it seems to keep loadind the CSVs into the first WorkSheet :/.
I am using PHPSpreadsheet to take some spreadsheets a user can upload, add a column with certain values, save the file as CSV, and use the following query to import the csv file:
LOAD DATA LOCAL INFILE '{$file}'
INTO TABLE {$table}
FIELDS TERMINATED…
I have the following code:
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);
$sheet->getPageMargins()
->setLeft(0.1)
->setRight(0.1)
…