In PHP, I'm trying to read an Excel file using COM():
$rrc_app = new COM("Excel.application");
$rrc_workbook = $rrc_app->Workbooks->Open($filename);
$rrc_worksheet = $rrc_workbook->Worksheets('Top sheet');
$rrc_worksheet->activate;
I tried to extract the value of a cell containing a "Time" value:
$review_time = $rrc_worksheet->Range("C30")->value;
However, it returns a decimal number:
0.604166666667
I know I can use the Format() function of VB, but I don't know from what object in PHP to call it from. The following:
$review_time = Format($rrc_worksheet->Range("C30")->value, "hh:mm:ss");
Gives:
Fatal error: Call to undefined function Format() in C:\xampplite\htdocs\pmc\index.php on line 40
Do you happen to know how I can call this Format() function using PHP?
Thanks in advance