Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems using Excel Sort Method
Message
De
20/07/2000 03:33:44
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
19/07/2000 14:45:53
Jared Anderson
Marketing Support Solutions, Inc.
Forest, Virginie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00394423
Message ID:
00394773
Vues:
9
>Cetin,
>
>No, that is simply the FoxPro line-continuation character.
>
>I did, however, try taking this out and having one long line w/ all the information, just in case this FoxPro semicolon was having some sort of "issue" in Excel ... but I still received the error.
>
>Thanks anyway!


If that's continuation line then syntax doesn't match. I think you misplaced optional Type parameter. Should be like :
oRecord.Range("A2:N"+ALLTRIM(STR(nBottom))).Sort(
oRecord.Range("A2"), xlAscending, ;
oRecord.Range("B1"), ,xlAscending, oRecord.Range("C2"), xlAscending, xlNo, 1, ;
.F., xlTopToBottom)
As a working sample :
Create cursor testcursor (fld1 i, fld2 i, fld3 i)
For ix = 1 to 10000
   Insert into testcursor values (int(rand()*5), int(rand()*10), int(rand()*100))
Endfor
Wait window nowait "Sending data to Excel..."

#include "xlConstants.h"	  && All xl97 constants
lcTempExcelFile=sys(5)+curdir()+"X"+sys(2015)+".xls"

Copy to (lcTempExcelFile) type xl5 && Copied to xls file
=sys(3006,1033)
oExcel = createobject("Excel.application")
With oExcel
   .workbooks.open(lcTempExcelFile) && Open saved xls
   With .Activeworkbook.Activesheet
      .Application.Selection.Sort( ;
         .Range("A2"), xlAscending, .Range("C2"), , xlDescending, ;
         .Range("B2"), xlAscending, xlYes, 1, .f., xlTopToBottom )
   Endwith
   wait clear
   .visible = .t. && Done - show
Endwith
lnHandle = fopen(lcTempExcelFile,12)
Do while lnHandle<0
   lnHandle = fopen(lcTempExcelFile,12)
Enddo
=fclose(lnHandle)
Erase (lcTempExcelFile)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform