I debugged the program and I noticed that you are setting all of the cells with ss_text, which tells Excel that the data is text data. Therefore, it is not applying any number or date formats to it.
I was able to solve the problem on my system by rewriting your "setColumn" subprocedure as follows:
Code: Select all
P*****************************************************************
P*
P* setColumn: Set data into cells for each row in a worksheet
P* for a workbook based on the passed in parameters.
P*
P*****************************************************************
P*
P* Incoming:
P* Incolumn Column Number (10I:0)
P* Instring String Data (1024A)
P* Instyle String Style (10A)
P*
P* Outgoing:
P* None
P*
P* Returns:
P* None
P*
P*****************************************************************
P setColumn B Export
D setColumn PI
D Incolumn 10I 0 Const
D Instring 1024A Const Varying
D Instyle 10A Const
D style S Like(SSCellStyle)
/Free
Select;
When Instyle = 'Text';
ss_text( row: Incolumn: %Trim(Instring): Text);
When Instyle = 'Dates';
ss_date( row: Incolumn: %date(Instring): Dates);
When Instyle = 'Numeric';
ss_num( row: Incolumn: %float(Instring): Numeric);
EndSl;
/End-Free
P E