J
jesseyzy
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button2Click(Sender: TObject);
var
i:integer;
eparamlevariant;
docutypelevariant;
wkbk:_workbook;
filenamelevariant;
begin
form1.OpenDialog1.InitialDir:=extractfiledir(paramstr(0));
form1.OpenDialog1.Execute ;
try
form1.ExcelApplication1.Connect ;
except
showmessage('cant connect !');
exit;
end;
form1.ExcelApplication1.Visible[0]:=false;
form1.ExcelApplication1.Caption:='execl document!';
eparam:=emptyparam;
docutype:=0;
try
wkbk:=form1.ExcelApplication1.Workbooks.Add(eparam,docutype);
wkbk:=form1.ExcelApplication1.Workbooks.Open(form1.OpenDialog1.FileName,
emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam,docutype );
except
begin
form1.ExcelApplication1.Disconnect ;
form1.ExcelApplication1.Quit ;
showmessage('select the execl');
exit;
end;
end;
showmessage('2nddddddd!!');
form1.ExcelApplication1.Disconnect ;
form1.ExcelApplication1.Quit ;
showmessage('convert is finish!!');
end;
提示:access violation at address 00000000;reader of address 00000000;process stopped
帮看看!·
在执行open 语句的时候
提示:access violation at address 00000000;reader of address 00000000;process stopped
var
i:integer;
eparamlevariant;
docutypelevariant;
wkbk:_workbook;
filenamelevariant;
begin
form1.OpenDialog1.InitialDir:=extractfiledir(paramstr(0));
form1.OpenDialog1.Execute ;
try
form1.ExcelApplication1.Connect ;
except
showmessage('cant connect !');
exit;
end;
form1.ExcelApplication1.Visible[0]:=false;
form1.ExcelApplication1.Caption:='execl document!';
eparam:=emptyparam;
docutype:=0;
try
wkbk:=form1.ExcelApplication1.Workbooks.Add(eparam,docutype);
wkbk:=form1.ExcelApplication1.Workbooks.Open(form1.OpenDialog1.FileName,
emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam,
emptyparam,emptyparam,emptyparam,emptyparam,docutype );
except
begin
form1.ExcelApplication1.Disconnect ;
form1.ExcelApplication1.Quit ;
showmessage('select the execl');
exit;
end;
end;
showmessage('2nddddddd!!');
form1.ExcelApplication1.Disconnect ;
form1.ExcelApplication1.Quit ;
showmessage('convert is finish!!');
end;
提示:access violation at address 00000000;reader of address 00000000;process stopped
帮看看!·
在执行open 语句的时候
提示:access violation at address 00000000;reader of address 00000000;process stopped