如果你是在 Delphi program中要得到工作表中某一字段,应先知道它在excel worksheet中的位置,编程时:
//.....some here
myvar:variant;
v:variant;
sheet;variant;
//........some here you should know
//call Excel.exe and open the workbook you have;
v:=createoleobject('excel.Application');
v.visible:=true;
v.workbooks[name].worksheet[name] //'name 'is file path _name
sheet:=v.workbooks[1].worksheets[1];
myvar:=sheet.cells[i,j];//(i,j) is the position you should know
//...............you other program