var msexcellevariant;
i,j:integer;
temp:string;
wbook,wsheetlevariant;
begin
msexcel:=createoleobject('excel.application');
wbook:=msexcel.application;
wbook.visible:=false;
wbook.workbooks.open('c:/*.xls');
wsheet:=wbook.activatesheet;
for i:=1 to wsheet.rows.count-1 do
begin
table.append;
for j:=1 to wsheet.columns.count do
begin
temp:=wsheet.cells[i,j].value;
if trim(temp)='' then goto ph:
table.fields[j-1].asstring:=temp;
end;
ph: if trim(wsheet[i,j].value='' then break;
end;
wsbook.save('c:/*.xls');
msexcel.quit;