最近使用ThinkPHP的第三方插件PheExcel导出多语言文件,但导出的文档中最后一个Sheet并不是我Code生成的
因为导出后的文件编辑后会再导入到系统中,因此对于该sheet必须删除掉[经测试”Worksheet“是PhpExcel自动生成的]

PhpExcel 删除默认的Sheet

 
$this->phpExcel = new \PHPExcel();
// remove 1st sheet
// remove default sheet [title=wordsheet]
$this->phpExcel->removeSheetByIndex(0); 
//create sheet and more code
$objPHPExcel->createSheet(0)->setTitle('sheet1');
// more code.....

  

参考:





相关文章:

  • 2021-12-07
  • 2021-06-02
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-12-23
  • 2021-11-19
  • 2021-07-11
猜你喜欢
  • 2022-12-23
  • 2021-08-06
  • 2022-02-08
  • 2022-12-23
  • 2022-02-17
  • 2022-12-23
  • 2022-01-09
相关资源
相似解决方案