P
panchenglin
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:
try
XLApp:= CreateOLEObject('Excel.Application');
XLApp.WorkBooks.open(ExcelFileName);
sheet := XLApp.workbooks[1].worksheets[1];
Row:= 4; //从第4行读单位编码数据
dwzh := XLApp.WorkBooks[1].Worksheets[1].Cells[Row,3];
................................................
................................................
finally
XLApp.WorkBooks.Close;
XLApp.quit;
XLApp := Unassigned;
end
try
XLApp:= CreateOLEObject('Excel.Application');
XLApp.WorkBooks.open(ExcelFileName);
sheet := XLApp.workbooks[1].worksheets[1];
Row:= 4; //从第4行读单位编码数据
dwzh := XLApp.WorkBooks[1].Worksheets[1].Cells[Row,3];
................................................
................................................
finally
XLApp.WorkBooks.Close;
XLApp.quit;
XLApp := Unassigned;
end