Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with saving REAL type to txt file
I have one little problem related to my post from yesterday.
I had to save a .txt file with spreadsheet data and that works fine, but the problem is that my macro doesn't save REAL type with decimal point but it saves like it is integer. Example: if one cell has value 50.0, and I load the cell into a Single type variable, when saved, it appears in txt file like 50 instead of 50. or 50.0 That's sort of problem, because it's input file for a old fortran application which needs REAL type at that field. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with saving REAL type to txt file
"Domagoj Vulin" wrote in message ... I have one little problem related to my post from yesterday. I had to save a .txt file with spreadsheet data and that works fine, but the problem is that my macro doesn't save REAL type with decimal point but it saves like it is integer. Example: if one cell has value 50.0, and I load the cell into a Single type variable, when saved, it appears in txt file like 50 instead of 50. or 50.0 That's sort of problem, because it's input file for a old fortran application which needs REAL type at that field. Solved, not quite elegant, so if someone has real solution of a problem... Function MakeDecimal(MyValue) If InStr(1, LTrim$(Str(MyValue)), ".") = 0 Then MakeDecimal= LTrim$(Str(MyValue)) & "." End If End Function The point is that in txt. file all is string. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem saving a file | Excel Discussion (Misc queries) | |||
problem saving csv file | Excel Discussion (Misc queries) | |||
File Size a real problem! | Excel Discussion (Misc queries) | |||
I am not real sure what type formula to use | Excel Discussion (Misc queries) | |||
problem when saving CSV file | Excel Worksheet Functions |