Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to sort a column in a Excel file ?
Message
 
 
To
10/07/2009 05:35:51
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01411352
Message ID:
01411363
Views:
60
Why can't you sort data before the export?

>I use EXPORT TO command to export a dbf file into a excel file,
>When I open the excel file, I want to sort the column A or Column D, how to code it ?
>
>
>use rpt077 in 0 share
>select rpt077
>EXPORT TO c:\wts\mid\wts77xls.xls TYPE XLS FIELDS lotno, cusno, cusname, itmcode, itmdisc,packing
>use
>oExcel = CREATEOBJECT([Excel.Application])
>oWorkbook = oExcel.Workbooks.open("C:\WTS\MID\WTS77XLS.XLS")
>oExcel.Visible = .t.
>oExcel.activesheet.Range("A1").value = "Lot No."
>oExcel.activesheet.Range("B1").value = "Customer Code"
>oExcel.activesheet.Range("C1").value = "Customer Name"
>oExcel.activesheet.Range("D1").value = "Item Code"
>oExcel.activesheet.Range("E1").value = "Item Desc."
>oExcel.activesheet.Range("F1").value = "Packing"
>
>
>
>Derek
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform