Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Export to Excel, Date field problem
Message
De
23/02/2007 01:10:21
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Export to Excel, Date field problem
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
DB2
Divers
Thread ID:
01198209
Message ID:
01198209
Vues:
43
Dear Experts

Following procedure converts dbf into Excel.
All fields exports to Excel except Date field.
Date field in Excel sheet appears as
23 oct 2007 instead of 23-10-2007 as in dbf.

How to export Date fields according to dbf.

Please help
set safety off
use ?
als1=alias()
if !empty(als1)
	gcdelimname =alias() + '.xls'
	gcdelimfile = putfile('excel_file:', gcdelimname, 'xls')
	if !empty(gcdelimfile)
		copy to (gcdelimfile) type xl5 && Create delimited file
	endif

	res=messagebox("Do you want to Open &gcDelimName",4+32+512,"Dbf2Xls")
	if res=6
		loexcel = createobject("Excel.Application")
		loworkbook = loexcel.workbooks.open(gcdelimfile)
		losheet = loworkbook.sheets(1) && or pass the name of your sheet as a string!
		losheet.columns().autofit()
		loexcel.visible = .t. && display Excel
	endif
endif
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform