In tyring to import a CSV file into Excel using Progress, I have found that Trailing negative numbers in the Csv file are imported and treated as Text by Excel rather than numbers.
Excel's OpenText method has a param, which I had assumed to be the 13th param called "TrailingMinusNumbers" which when set to true would be able to treat and import the negative numbers as actual numbers. Putting it at the 13th position, as I had thought, failed. However, after some trials, putting it on the 17th position seems to work in my case with Excel 2007.
What I be very interested to know is for some other interested soul to try it out and see whether it is true in your case with your version of Excel or with different negative numbers columns. Syntax as follows:-
Def var ExAppl as com-handle.
CREATE "Excel.Application" ExAppl.
ExAppl:Visible=true.
ExAppl:Workbooks:OpenText ( "C:\SampleTest.txt",,,1,,,,True,,,, ,,,,,True).
ExAppl:Range("B:F"):HorizontalAlignment = -4152. /*xlRight value*/
ExAppl:SELECTION:NumberFormat = "#,##0.00_);[Red](#,##0.00)".
ExAppl:Cells(1,1):SELECT().
ExAppl:SELECTION:ColumnWidth = 10.
RELEASE OBJECT ExAppl.
If it is consistent, then it should be useable and should save me and others some extra codings.
[Attached a sample test file. ]
Excel's OpenText method has a param, which I had assumed to be the 13th param called "TrailingMinusNumbers" which when set to true would be able to treat and import the negative numbers as actual numbers. Putting it at the 13th position, as I had thought, failed. However, after some trials, putting it on the 17th position seems to work in my case with Excel 2007.
What I be very interested to know is for some other interested soul to try it out and see whether it is true in your case with your version of Excel or with different negative numbers columns. Syntax as follows:-
Def var ExAppl as com-handle.
CREATE "Excel.Application" ExAppl.
ExAppl:Visible=true.
ExAppl:Workbooks:OpenText ( "C:\SampleTest.txt",,,1,,,,True,,,, ,,,,,True).
ExAppl:Range("B:F"):HorizontalAlignment = -4152. /*xlRight value*/
ExAppl:SELECTION:NumberFormat = "#,##0.00_);[Red](#,##0.00)".
ExAppl:Cells(1,1):SELECT().
ExAppl:SELECTION:ColumnWidth = 10.
RELEASE OBJECT ExAppl.
If it is consistent, then it should be useable and should save me and others some extra codings.

[Attached a sample test file. ]