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;
// 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;