Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid path or filename
Message
 
 
To
09/07/2012 05:34:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01547814
Message ID:
01547848
Views:
23
Dragan pointed out - instead of your code for gcDelimName use
gcDelimfile = forcepath(m.gcDelimName, lcPath)

Also, why you're using gcDelimfile - are you creating a global variable?


>hello and thank you for reply,
>LOWB.Save
>use name expressions&& no idea
>
>
>
>>>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)
>>>
>>>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform