i'm doing Excel XLSX editing with PHP through COM component,
i need to add an outside txt file to a sheet as an OleObjects,
here is my code:
$tmpSheet = $excel->ActiveWorkbook->Sheets->Add();
$tmpSheet->Activate();
$tmpSheet->Name = "runLog";
$tmpObj = array("", "e:/test01.txt"
=);
$tmpSheet->OLEObjects->Add($tmpObj);
return error is:
Source:</b> Microsoft ExcelDescription:</b> Cannot insert object.
how can i solve it?
thank you.