I have this
<TABLE>
<?
$sheet="Sheet1";
$MyEx = new COM("Excel.Application") or Die ("Did not connect");
$MyCartella = $MyEx->application->Workbooks->Open("Cartel1.xls") or
Die ("Did not open $userfile_name");
$Foglio = $MyCartella->Worksheets($sheet);
$Foglio->Select;
for($row=1;$row>0;$row++){
echo '<TR ALIGN="left" VALIGN="middle">';
for($col="A";$col<="Z";$col=chr(ord($col)+1)){
$Cella = $Foglio->Range($col.$row);
$Valore = $Cella->Value;
if($Valore==""){
$Cellaidx = $Foglio->Range("A".$row);
if($Cellaidx->Value==""){
echo '</TR>';
break 2;
}
break;
}
echo "<td>$Valore</td>";
}
echo '</TR>';
}
?>
</TABLE>
Now I have two problems
1. if the sheet excel begins with 1 or more empty cells I see nothing, but I have already some idea
2. if the sheet exel is called in a various from of "Sheet1" I have a Warning error: Invoke() failed there is someone that has some idea in order to recover the name of the first sheet of the Workbook excel passed?
Thanks for the attention