//php file
$strSheetName = 'test';
$objXLApp = new COM( "excel.application" ) or die( "unable to start
MSExcel" );
$objXLApp->Workbooks->Open( "path/test.xls" );
$objXLSheet = $objXLApp->ActiveWorkBook->WorkSheets( $strSheetName );
$i=3;
do
{
$strCellName = 'B'.$i;
$objXLCell = $objXLSheet->Range( $strCellName);
$i++;
echo $objXLCell->Value()."<br>";
}while($objXLCell->Value());
echo $i;
//print $objXLCell->Value();
//objXLsheet.Range("A1:A100")
//print "Cell $strCellName in $strSheetName: \"" . $objXLCell->Value() .
"\"\n";
// must do all of these to release resources correctly...
unset( $objXLCell );
unset( $objXLSheet );
$objXLApp->ActiveWorkBook->Close();
$objXLApp->Quit();
unset( $objXLApp );
Hello, i m using this script for importing excel data into database.Here i have used my logic for exporting data from all columns.is there any function of COM using which we can iterate through until there is a record or we can specify the range?