FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV 2024
→
Excel export date format
Excel export date format
Iniciado por Arie Mars, 29,oct. 2010 16:40 - 3 respuestas
Conéctese…
Arie Mars
#1
Publicado el 29,octubre 2010 - 16:40
When I export the data in a tablecontrol to Excel, all date columns are formatted as "custom" instead of "date". This way, sorting such a column in Excel does not work as expected.
Is there a way to get real date columns in Excel, without al lot of programming, which would make development 10 times slower
?
Informar
0
0
Jean-Yves LIXON
#2
Publicado el 06,noviembre 2010 - 02:05
Hello Arie,
Because Windev return a date like this: "YYYYMMJJ"
In this case, you have only two solutions:
1) After fill the Excel document, you open it and modify the column in a good format.
2) By program:
LOCAL
MyXlsDocument is a xlsDocument
MyXlsDocument = XlsOpen("c:\Excel\Doc.xls")
// If the second Column is a date format:
IF MyXlsDocument -1 THEN
MyXlsDocument..Column[2]..Type = xlsTypeDate
END
Best regards,
Jean-Yves
Informar
0
0
Steve
#3
Publicado el 19,noviembre 2010 - 07:55
I have a similar problem. When I try to use the code that was suggested I get the error message ".." operator forbidden. It occurs on the "Type" property of my column[3]. What have I done wrong?
My Code Follows ----------------------
ResDir is string
MyXlsDocument is a xlsDocument
ResDir = SysDir(srDesktop)
ResDir = ResDir + "\ExportedFSMH.XLS"
TableToExcel(WIN_Export.Table_qCollectedData,ResDir,taWithLayout)
MyXlsDocument = xlsOpen(ResDir)
IF MyXlsDocument -1 THEN
MyXlsDocument..Column[3]..Type = xlsTypeDate
MyXlsDocument..Column[5]..Type = xlsTypeDate
END
Thanks
Steve
Informar
0
0
Henri Ganancia
#4
Publicado el 04,octubre 2021 - 17:22
Je reviens sur la demande consistant à mettre à jour en écriture (lors d'un export de données vers Excel) le format de la cellule au format date, par exemple, pour forcer le type de cellule.
Apparemment La propriété Type étant en lecture seule, une telle mise à jour n'est pas possible, mais qualeq'un a-t-il une solution?
Merci à tous
Informar
0
0
→ Volver a WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto