-
Convert HTML Table Into Excel
Convert a table from an HTML file into an excel file with PHP using PHPSpreadSheet. Import an HTML table into an excel file using PHPSpreadSheet. Maintain the same columns and rows, and keep the exact data to their specific positions. Some PHP functions will be used like file_get_contents() to read the entire file into a […]
-
Create a Grocery List Template in Excel
Learn How to Create a Grocery List Template in Excel with PHP using PHPSpreadSheet. List down and organize all your grocery item needs before doing a shopping to save time. Group the things-to-buy according to their classification and put both the estimated price for each item and the total estimated price of all the items. […]
-
Insert Pictures In Excel Files In PHP Using PHPSpreadSheet
Learn how to insert pictures in excel files in PHP using PHPSpreadSheet. You can insert pictures in excel files by creating a new Drawing object and then set it’s properties such as the path, height, and name of the picture. You can also set the specific cell address where you would exactly like the picture […]
-
Add Header Logo In Excel Files In PHP Using PHPSpreadSheet
Learn how to add excel header logo in PHP using PHPSpreadSheet. You can align the header logo to the left side, center, or right side. Make sure you set the correct path to your logo file, otherwise it will not appear at the header even if your codes are correct. Other logo attributes can also […]
-
Add Cell Borders
Are you looking for snippets that will add spreadsheet cell borders? Continue down below to check out the different snippets to use in adding spreadsheet cell borders with PhpSpreadsheet or Google Sheets API PHP Client. PhpSpreadsheet (Excel Files) /// Set borders to A1 $sheet->getStyle(‘A1’)->getBorders()->getTop()->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK); $sheet->getStyle(‘A1’)->getBorders()->getBottom()->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK); $sheet->getStyle(‘A1’)->getBorders()->getLeft()->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK); $sheet->getStyle(‘A1’)->getBorders()->getRight()->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK); Google Sheets API PHP Client $requests = [ […]
-
Unmerge Cells
Are you looking for snippets that will unmerge spreadsheet cells? Check out below the different snippets to use to unmerge cells with PhpSpreadsheet or Google Sheets API PHP Client. PhpSpreadsheet (Excel Files) // Unmerge cells from A1 to D5 $sheet->unmergeCells(‘A1:D5’); Google Sheets API PHP Client $requests = [ new Google_Service_Sheets_Request([ ‘ununmergeCells’ => [ ‘range’ => […]
-
Count Google SpreadSheets Cells With Text In PHP Using Google Sheets API PHP Client
Learn how to count Google SpreadSheets cells with text in PHP using Google Sheets API PHP Client. Using the REST Resource spreadsheets.values with method update you can specifically set the COUNTA formula that will count cells with text in Google SpreadSheets. The COUNTA formula will return the number of values in a dataset. This article […]
-
Create Excel Files With Max Formula In PHP Using PHPSpreadSheet
Learn how to create excel files with MAX formula in PHP using PHPSpreadSheet. You can code and write a max formula that would get the maximum value from a given specific range of cells, or get the max value between two cells, or max value of only selected cells. This article will discuss the basic […]
-
Create Excel Files With Average Formula In PHP Using PHPSpreadSheet
Learn how to create excel files with AVERAGE formula in PHP using PHPSpreadSheet. You can code and write an average formula that would add values of specific range of cells and get it’s average, or get the total values of only selected cells before getting it’s average. This article will discuss the basic process of […]