PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
Excel export date format
Excel export date format
Started by Arie Mars, Oct., 29 2010 4:40 PM - 3 replies
Connect yourself…
Arie Mars
#1
Posted on October, 29 2010 - 4:40 PM
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
?
Report
0
0
Jean-Yves LIXON
#2
Posted on November, 06 2010 - 2:05 AM
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
Report
0
0
Steve
#3
Posted on November, 19 2010 - 7:55 AM
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
Report
0
0
Henri Ganancia
#4
Posted on October, 04 2021 - 5:22 PM
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
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text