How to parse data from HTML and export in Excel in PHP

后端 未结 1 490
孤独总比滥情好
孤独总比滥情好 2021-01-29 10:43

I want to read HTML table data from HTML page (without using of data base) and Export into Excel file . I am using this Javascript cede but it is not working. Please Suggest me,

1条回答
  •  -上瘾入骨i
    2021-01-29 10:49

    From PHP :

    $objReader = PHPExcel_IOFactory::createReader('HTML');
    $objPHPExcel = $objReader->load("myHtmlFile.html");
    
    $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
    $objWriter->save("myExcelFile.xlsx");
    

    0 讨论(0)
提交回复
热议问题