Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy without save window
Message
De
25/11/2011 11:01:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Copy without save window
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01529800
Message ID:
01529800
Vues:
74
hi all
i need to copy excel book to the path directly without save wondow and no open excel sheet after save
gcDelimName = ALIAS( ) + '.xls'
gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
IF EMPTY(gcDelimFile)  
CANCEL
ENDIF
gcDelimfile = forcepath(m.gcDelimfile,'c:\dept\zarqa\')
 COPY TO (gcDelimFile) XLS 
 

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) = " O??) "+TRANSFORM(YEAR(DATE()))+'/'+TRANSFORM(MONTH(DATE())-1)
loWS.cells(1,1).Font.bold  = .t.
loWS.cells(1,1).Font.Size= 14


*loExcel.VISIBLE	= .T.
*loExcel			= NULL
thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform