How to set active sheet without loading an xlsx file?

前端 未结 4 740
执笔经年
执笔经年 2021-02-09 15:48

I am using PHPExcel to generate an xl using php. I am not loading an xl sheet but creating new sheets using

$phpExcel = new PHPExcel();
$phpExcel-&g         


        
4条回答
  •  無奈伤痛
    2021-02-09 16:30

    If you are directly manipulating the xml in workbook.xml

    $replace = '#activeTab="\d"#i';
    $with = 'activeTab="0"';
    $newxmlfile=preg_replace($replace,$with,$newxmlfile); // force activetab to sheet 1
    

提交回复
热议问题