-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into currencies_stored_as_strings
- Loading branch information
Showing
184 changed files
with
2,144 additions
and
2,461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
<?php | ||
|
||
use PhpOffice\PhpSpreadsheet\IOFactory; | ||
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing; | ||
|
||
require __DIR__ . '/../Header.php'; | ||
|
||
// Read from Xlsx (.xls) template | ||
$helper->log('Load Xlsx template file'); | ||
$reader = IOFactory::createReader('Xlsx'); | ||
// Note that Xlsx converts bmp to png, so it needs to be added | ||
// programmatically rather than in template. | ||
// Also note Xls converts both bmp and gif to png. | ||
$spreadsheet = $reader->load(__DIR__ . '/../templates/27template.xlsx'); | ||
$sheet = $spreadsheet->getActiveSheet(); | ||
$drawing = new Drawing(); | ||
$drawing->setName('Test BMP'); | ||
$drawing->setPath(__DIR__ . '/../images/bmp.bmp'); | ||
$drawing->setCoordinates('G17'); | ||
$drawing->setWorksheet($sheet); | ||
|
||
$sheet->getCell('G16')->setValue('BMP'); | ||
$sheet->getStyle('G16')->getFont()->setName('Arial Black')->setBold(true); | ||
|
||
// Save | ||
$helper->write($spreadsheet, __FILE__); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.