Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid path or filename
Message
De
09/07/2012 05:26:15
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
09/07/2012 03:57:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 7
Database:
Visual FoxPro
Divers
Thread ID:
01547814
Message ID:
01547839
Vues:
25
>thank you, no errors about bath,
>after the path code i use this code i get error message at LOWB.Save

Again, use name expressions:

>
>SET DEFAULT TO C:\dept
>a=TRANSFORM(dtos(DATE()-1), "@R 9999_99")
>lcPath="c:\dept\"+a
>if not directory(lcPath)
>   mkdir (lcPath)
>   ENDIF
>   set default to (lcPath)&&
>gcDelimName = ALIAS( ) + '.xls'&& or xlsx
* gcDelimfile = forcepath(m.gcDelimName,'c:\dept\&a')

gcDelimfile = forcepath(m.gcDelimName, lcPath)

>IF !EMPTY(m.gcDelimFile)  
>  COPY TO (m.gcDelimFile) type XLS 
>ENDIF
>****************************************
>Local loExcel 
>xlDown =   -4121
>xlLastCell = 11
>
>loExcel = CREATEOBJECT('Excel.Application')
>loExcel.DisplayAlerts = .F.
>
>
>LoWb = loExcel.WorkBooks.OPEN(gcDelimFile)
>loWs = loExcel.WorkSheets(1)
>
>loWs.Rows("1:"+Transform(3)).insert(xlDown)
>lows.Range(lows.Cells(1,1),lows.Cells(1,lows.Application.ActiveCell.SpecialCells(xlLastCell).Column) ).MergeCells = .T.
>loWS.cells(1,3).Font.bold  = .t.
>loWS.cells(1,3).Font.Size= 14
>loWS.cells(1,1) = "ÇáÞÖÇíÇ ÇáÞÇÈáÉ ááÇÚÊÑÇÖ Úä ÔåÑ) "+TRANSFORM(YEAR(DATE()))+'/'+TRANSFORM(MONTH(DATE())-1)
>loWS.cells(1,1).Font.bold  = .t.
>loWS.cells(1,1).Font.Size= 14
>
>
>LOWB.Save
>LOWB.CLOSE(1)
>
>

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform