我在xp,office xp中写了一个程序,调试没有问题,excel倒入导出正常;
但是在别人的机器上,xp,offixe 2000运行时
却出现提示内存错误
我用的语句为:
Var
i,row,column:integer;
begin
try
ExcelApplication1.Connect;
except
MessageDlg('ÊÇ·ñÕýÈ·°²×°Excel?',mtError,[mbok],0);
abort;
end;
ExcelApplication1.Visible[1]:=false;
ExcelApplication1.Caption:='ExcelÊä³ö';
ExcelApplication1.Workbooks.Add(null,0);
ExcelWorkbook1.ConnectTo(ExcelApplication1.Workbooks[1]);
ExcelWorksheet1.ConnectTo(ExcelWorkbook1.Worksheets[1] as _worksheet );
Excelworksheet1.Cells.Item[1,1]:='¿¼ÊÔÃû³Æ';
ExcelWorkSheet1.Cells.Item[1,2]:='Ä꼶';
ExcelWorksheet1.Cells.Item[1,3]:='°à';
ExcelWorksheet1.Cells.Item[1,4]:='¿ÆÄ¿';
ExcelWorksheet1.Cells.Item[1,5]:='¼°¸ñÂÊ£¨%£©';
ExcelWorksheet1.Cells.Item[1,6]:='ÓÅÐãÂÊ£¨%£©';
ExcelWorksheet1.Cells.Item[1,7]:='ƽ¾ù·Ö';
row:=2;
AdoQuery3.First;
while not adoquery3.Eof do
begin
Column:=1;
for i:=1 to adoquery3.FieldCount do
begin
if adoquery3.Fields[2].AsInteger<>0 then
begin
ExcelWorkSheet1.Cells.Item[row,column]:=adoquery3.Fields[i-1].AsString;
column:=column+1;
end
else
begin
ExcelWorkSheet1.Cells.Item[row,column]:=adoquery3.Fields[i-1].AsString;
ExcelWorkSheet1.Cells.Item[row,3]:='&Egrave;&laquo;&Auml;ê&frac14;&para;';
column:=column+1;
end;
end;
row:=row+1;
adoquery3.Next;
end;if Savedialog1.Execute then
begin
ExcelWorksheet1.SaveAs(SaveDialog1.FileName);
end;
ExcelApplication1.Quit;
ExcelApplication1.Disconnect;
showmessage('&micro;&frac14;&sup3;&ouml;&sup3;&Eacute;&sup1;&brvbar;&pound;&not;&Ccedil;&aring;&sup2;é&iquest;&acute;');
end;
请问是怎么回事
是不是在office xp中编译的,不能在office2000中使用?????????