Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation and Excel
Message
De
06/02/2003 12:51:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00749786
Message ID:
00750009
Vues:
19
PUBLIC osheet,mrate,mprice
SELECT sm_loan_type
SET ORDER TO program
oExcel=createobject('Excel.application')
obook=oExcel.workbooks.open('g:\smc\rates\rbmg.xls',0)
obook.Sheets("Correspondent").Select
osheet=oexcel.activesheet
oExcel.visible=.f.
mcompany='RBMG'
mprogram1=SPACE(50)
mprogram2='CONVENTIONAL 25 YEAR FIXED'
mprogram3='CONVENTIONAL 20 YEAR FIXED'
mloan_type2=SPACE(50)
mloan_type3=SPACE(50)
mprice=0.00
meff_date=DATE()
DIMENSION lock_days(1,5)
lock_days(1,1)=15
lock_days(1,2)=30
lock_days(1,3)=45
lock_days(1,4)=60
lock_days(1,5)=75
mrow=15
mcol=1
x=1
mprogram1=osheet.cells(mrow,mcol).value
SELECT sm_loan_type
SEEK mprogram1
mloan_type=sm_loan_type.loan_type
SEEK mprogram2
mloan_type2=sm_loan_type.loan_type
SEEK mprogram3
mloan_type3=sm_loan_type.loan_type
mprogram4=osheet.cells(15,11).value
SEEK mprogram4
mloan_type4=sm_loan_type.loan_type
mrow=mrow+2
mcol2=11
mrow2=mrow
Do While mrow<=28 && conventional 30/25/20
mrate=osheet.cells(Mrow,Mcol).Value
Mcol=Mcol+1
mprice=osheet.cells(Mrow,Mcol).Value
If Vartype(mprice)='N'
For x=1 To 5
If Vartype(mprice)='N'
Select sm_rates
Insert Into sm_rates (company,loan_type,Program,Date,lock_days,rate,price);
VALUES(mcompany,mloan_type,mprogram1,meff_date,lock_days(1,x),mrate*100,mprice)
*DO track_change IN sm_proc
Insert Into sm_rates (company,loan_type,Program,Date,lock_days,rate,price);
VALUES(mcompany,mloan_type2,mprogram2,meff_date,lock_days(1,x),mrate*100,mprice)
*DO track_change IN sm_proc
Insert Into sm_rates (company,loan_type,Program,Date,lock_days,rate,price);
VALUES(mcompany,mloan_type3,mprogram3,meff_date,lock_days(1,x),mrate*100,mprice)
*DO track_change IN sm_proc
Mcol=Mcol+1
Else
Exit
Endif
mprice=osheet.cells(Mrow,Mcol).Value
Endfor
Else
Exit
ENDIF
mrate=osheet.cells(Mrow2,Mcol2).Value
Mcol2=Mcol2+1
mprice=osheet.cells(Mrow2,Mcol2).Value
If Vartype(mprice)='N'
For x=1 To 5
If Vartype(mprice)='N'
Select sm_rates
Insert Into sm_rates (company,loan_type,Program,Date,lock_days,rate,price);
VALUES(mcompany,mloan_type4,mprogram4,meff_date,lock_days(1,x),mrate*100,mprice)
*DO track_change IN sm_proc
Mcol2=Mcol2+1
Else
Exit
Endif
mprice=osheet.cells(Mrow2,Mcol2).Value
Endfor
Else
Exit
ENDIF
Mrow=Mrow+1
Mcol=1
mcol2=11
Enddo &&mrow<26
obook.close(.t.)
oexcel.displayalerts=.f.
oexcel.quit
RELEASE obook
RELEASE oexcel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform