I trying to do a multiple sort using VFP and Excel.
Here is my code:
oExcel=Createobject('Excel.Application')
oBook=oExcel.Workbooks.Open("C:\warranty.xls")
oexcel.visible=.t.
oExcel.Application.Cells.Select
oExcel.Application.Cells.Sort(oExcel.Application.Range("J2"),2,oExcel.Application.Range("I2"),2,1,oExcel.Application.Range("AO2"),1,0,1,.f.,1,,,,)
This is not working.
When I open Excel and look at the sort after I perform the VFP call, the first and third sort fields are filled but the 2nd one is not filled.
The parameter after the 2nd key is TYPE and is an optional parameter.
I have tried to even pass a parameter in this position but because it is not needed in this case, I get an error.
MG - My previous thread was deleted and I received an email that I needed to post it withing Microsoft: VFP - Automation, Mail & 3rd Party Svcs Forum ???????? so here it is again.
Thanks,
KFlasph
Here is my code:
oExcel=Createobject('Excel.Application')
oBook=oExcel.Workbooks.Open("C:\warranty.xls")
oexcel.visible=.t.
oExcel.Application.Cells.Select
oExcel.Application.Cells.Sort(oExcel.Application.Range("J2"),2,oExcel.Application.Range("I2"),2,1,oExcel.Application.Range("AO2"),1,0,1,.f.,1,,,,)
This is not working.
When I open Excel and look at the sort after I perform the VFP call, the first and third sort fields are filled but the 2nd one is not filled.
The parameter after the 2nd key is TYPE and is an optional parameter.
I have tried to even pass a parameter in this position but because it is not needed in this case, I get an error.
MG - My previous thread was deleted and I received an email that I needed to post it withing Microsoft: VFP - Automation, Mail & 3rd Party Svcs Forum ???????? so here it is again.
Thanks,
KFlasph