Focal Point
[SOLVED] Multiple date formats in single report column exported to excel

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8657008895

February 16, 2011, 06:21 AM
Craig G
[SOLVED] Multiple date formats in single report column exported to excel
Does anyone know/or could suggest, a way to retain the date format identity of an excel cell; when multiple date formats for a single report column in webfocus have been exported to excel?

The Issue -
I have been able to export multi date formats (‘YY’, ‘MtYY’ ‘DMtYY’) for a single reporting column in WEBFOCUS by dynamically altering the date format at each row cell; example:

TABLE FILE DATEFILE
PRINT
DATEOUTPUT
DATEFORMAT
ON TABLE HOLD AS TEMPDATE FORMAT FOCUS
END
-RUN

TABLE FILE TEMPDATE
PRINT
DATEOUTPUT/DATEFORMAT AS ‘Date’
ON TABLE PCHOLD FORMAT EXL2K
END


The EXL2KTXTDATE is set to ‘VALUE’, but as DATEFORMAT is a defined alphanumeric to hold the three date formats; when the report is exported to Excel the date cells are not identified as a date format and cannot be sorted correctly.

Thanks,
Craig G

This message has been edited. Last edited by: Kerry,


Webfocus 7611
OS:XP
HTML, AHTML,CSV,EXCEL
February 22, 2011, 03:58 PM
Kerry
Hi Craig,

Can you please try the following code from our technicals:

DEFINE FILE EMPDATA
CFORMAT/A8=DECODE DEPT ('SALES' 'YMD' 'MARKETING' 'MtDY'
ELSE 'YMTD');
END
TABLE FILE EMPDATA    
PRINT HIREDATE HIREDATE/CFORMAT
BY DEPT
WHERE DEPT EQ 'SALES' OR 'MARKETING' OR 'PERSONNEL'
ON TABLE PCHOLD FORMAT EXL2K
END


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
February 23, 2011, 09:27 AM
George Patton
mmmmmmm.... I like that idea. Neat.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP