我做的用EXCEL打印报表,出现“OLE error 800A03EC” ( 积分: 100 )

  • 主题发起人 主题发起人 whshen
  • 开始时间 开始时间
W

whshen

Unregistered / Unconfirmed
GUEST, unregistred user!
我做的用EXCEL打印报表,出现“OLE error 800A03EC”, 跟踪到红色处出错,请大侠们帮助一下,
// Page Break , then
have a new page
if ( ((yAddLine+i) mod yDetailRows= 0) and (ySumCount=0)) or (ySumCount-1=yDetailRows) or (yBreakPage=True) then
begin
if (yMoveBy = True) then
CurData.MoveBy(yEndDetail-ybegin
Detail+1);
yBreakPage := False;
yCurDetail :=0;
yCurPages := yCurPages + 1;
FmGauge.Gauge1.Progress := 10 + FloatToInt(90*(yCurPages/(yPages+1)));
yRange := 'A'+IntToStr((yCurPages-1)*yMaxRows+1)+':'+xlIV+IntToStr(yCurPages*yMaxRows);
[red]Sheet.Range[yRange].Copy;[/red] //跟踪至处出错
yRows := 'A'+IntToStr(yCurPages*yMaxRows+1);
Sheet.Range[yRows].PasteSpecial;
yRows := 'A'+IntToStr(yCurPages*yMaxRows*FMultiRows+1);
if FNoBreak=False then
Sheet.Range[yRows].PageBreak := 1;
yDetailLine := (yCurPages-1)*yMaxRows + ybegin
Detail -(yAddLine+i) -1;
 
我做的用EXCEL打印报表,出现“OLE error 800A03EC”, 跟踪到红色处出错,请大侠们帮助一下,
// Page Break , then
have a new page
if ( ((yAddLine+i) mod yDetailRows= 0) and (ySumCount=0)) or (ySumCount-1=yDetailRows) or (yBreakPage=True) then
begin
if (yMoveBy = True) then
CurData.MoveBy(yEndDetail-ybegin
Detail+1);
yBreakPage := False;
yCurDetail :=0;
yCurPages := yCurPages + 1;
FmGauge.Gauge1.Progress := 10 + FloatToInt(90*(yCurPages/(yPages+1)));
yRange := 'A'+IntToStr((yCurPages-1)*yMaxRows+1)+':'+xlIV+IntToStr(yCurPages*yMaxRows);
[red]Sheet.Range[yRange].Copy;[/red] //跟踪至处出错
yRows := 'A'+IntToStr(yCurPages*yMaxRows+1);
Sheet.Range[yRows].PasteSpecial;
yRows := 'A'+IntToStr(yCurPages*yMaxRows*FMultiRows+1);
if FNoBreak=False then
Sheet.Range[yRows].PageBreak := 1;
yDetailLine := (yCurPages-1)*yMaxRows + ybegin
Detail -(yAddLine+i) -1;
 
有没有人救救我呀
 
值得注意的是:不要再ole控制的时候对excel进行任何操作,察看也不行!!
 
Sheet.Range[yRange].Copy;

建议楼主去看Delphi的ocx/servers/目录下面的Execl2000.pas 等文件
 
好的,我看看
 
后退
顶部