Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to sort a column in a Excel file ?
Message
 
 
À
12/07/2009 22:54:47
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01411352
Message ID:
01411846
Vues:
77
#DEFINE xlSortOnValues 0
#DEFINE xlAscending 1
#DEFINE xlSortNormal 0

#DEFINE xlYes 1
#DEFINE xlNo 2

lnLastRow = oSheet.UsedRange.Rows.Count
lnLastCol = oSheet.UsedRange.Columns.Count
lnCol2SortOn = 1

WITH oSheet.Sort
	.SortFields.Clear()
	.SortFields.Add(oSheet.Range(oSheet.Cells(1,lnCol2SortOn),oSheet.Cells(lnLastRow,lnCol2SortOn)), ;
			xlSortOnValues, xlAscending, xlNo, xlSortNormal)
	.SetRange(oSheet.Range("A1", oSheet.Cells.SpecialCells(xlLastCell)))
	.Header = xlYes
	.Apply()
ENDWITH	
>Make it simple.
>If I not use the EXPORT TO command,
>how to sort a column in a Excel File.
>
>Derek
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform