Hi,
I'm getting this message when I try to compare value in the Cell with a value of the field in the cursor c_report.ordate (bolded line in code):
SELECT c_report
For i=7 to _TALLY
.Cells(i,1)=c_report.cust
.Cells(i,2)=c_report.orderID
.Cells(i,3)=c_report.orline
.Cells(i,4)=c_report.part
.Cells(i,5)=c_report.clas
.Cells(i,6)=c_report.group
For k=10 to 20 step 2
if (.Cells(5,k).Value)=(c_report.ordate) then
.Cells(i,k)=c_report.ordate
.Cells(i,k+1)=c_report.QTY
Else
.Cells(i,10)=c_report.ordate
.Cells(i,11)=c_report.QTY
Endif
EndFor
GOTO i
EndFor
Cells(k,10)(k=5 to 20 step2) already contains dates in I set earlier as those dates are part of heading and they are in format month/day/year (4/11/01) the same as c_report.ordate field.
My program should display all records in Excel sheet so from my program I' opening excel:
XL=CreateObject("Excel.Application"
XL.Visible=.T.
XL.Workbooks.Add()
Thanks for any help,
Lyn
I'm getting this message when I try to compare value in the Cell with a value of the field in the cursor c_report.ordate (bolded line in code):
SELECT c_report
For i=7 to _TALLY
.Cells(i,1)=c_report.cust
.Cells(i,2)=c_report.orderID
.Cells(i,3)=c_report.orline
.Cells(i,4)=c_report.part
.Cells(i,5)=c_report.clas
.Cells(i,6)=c_report.group
For k=10 to 20 step 2
if (.Cells(5,k).Value)=(c_report.ordate) then
.Cells(i,k)=c_report.ordate
.Cells(i,k+1)=c_report.QTY
Else
.Cells(i,10)=c_report.ordate
.Cells(i,11)=c_report.QTY
Endif
EndFor
GOTO i
EndFor
Cells(k,10)(k=5 to 20 step2) already contains dates in I set earlier as those dates are part of heading and they are in format month/day/year (4/11/01) the same as c_report.ordate field.
My program should display all records in Excel sheet so from my program I' opening excel:
XL=CreateObject("Excel.Application"
XL.Visible=.T.
XL.Workbooks.Add()
Thanks for any help,
Lyn