>Got a little routine that creates Excel and comma-delimited variables from the records in a cursor. I'm seeing one of the columns coming out in the results as "***.**" instead of "120.32" though other fields seem fine, regardless of their size. Is it something to do with the TRANSFORM function and the size of the first record's value (which is only "12.34")? Or something?
>
>
>
>PROCEDURE p_CreateDownloadFiles
>
>SCAN
> FOR I = 1 TO FCOUNT()
> m.CommaDelimitedData = m.CommaDelimitedData + '"' + TRANSFORM(EVALUATE(FIELD(I))) + '"' + IIF(I <FCOUNT(), ',', '' )
> m.ExcelData = m.ExcelData + TRANSFORM(EVALUATE(FIELD(I))) + CHR(9)
> NEXT
> m.CommaDelimitedData = m.CommaDelimitedData + TCR_LF
> m.ExcelData = m.ExcelData + TCR_LF
>ENDSCAN
>
>ENDPROC
>
>
Jay,
I don't think so nor do I know the answer.
My curiosity why are you creating a comma delimited file this way? If you need a text file why are you creating it comma delimited when target is excel. IOW I didn't understand the purpose of this code and you might simply ignore my reply:)
Cetin