insertUrl_demo.php 398 B

1234567891011121314
  1. <?php
  2. /**
  3. * 插入超链接demo
  4. */
  5. require_once(__DIR__ . '/../vendor/autoload.php');
  6. use Pxlswrite\Pxlswrite;
  7. $fileObj = new Pxlswrite(['path' => __DIR__ . '/uploads']);
  8. $fileObj->fileName("insertUrl.xlsx");
  9. $fileObj->insertUrl(1, 0, 'https://github.com', ['underline'=>Pxlswrite::UNDERLINE_SINGLE,'fontColor'=>Pxlswrite::COLOR_GREEN]);
  10. $fileObj->insertText(1, 0, 'View');
  11. $fileObj->output();