Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I want to save an excel xls file as the format of "formatted text (space delimited)". My question is given the excel file (from which, i know the width of each column, and the value of each range), how do I know the number of spaces between any two neighboring values in the saved text file? (I want to be very specific about that number) For example, if in the original excel file, range("A1") = "0.123" and range("B1") = "abc", what would be the number of spaces between the "0.123" and "abc" in the text file? For column width I can get in vba (columns(1).width), but I guess the number of spaces apparently also depends on the width of the specific content within a cell. For example, for a cell with the content "0.123" or "abc", the width of the content could be (the width of a single digit * 4 + the width of a decimal point) or (the width of a letter * 3). It should also depend on the font/format/size of that cell. After I know the width of the column and the width of the content, the number of spaces between neighboring values should be a function of the difference in the widths in excel. But I can't find any websites/books which would give me this kind of information. Thanks a lot, greatly appreciate any help or tips. Just to clarify, I am more interested in the answer to my question above, rather than a workaround such as saving the file first, then manually increase/decrease the spaces in the text file. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing CSV file (saved as Text) into XL as Text -- over 60 colu | Excel Discussion (Misc queries) | |||
Need Help Importing Text File Using Two or More Spaces as the Delimiter | Excel Discussion (Misc queries) | |||
auto save excel file every 10 minutes to its original file name | Excel Discussion (Misc queries) | |||
Saved ungrouped cells to a text file | Excel Discussion (Misc queries) | |||
Auto save replaced my original file and now I need the original? | Excel Discussion (Misc queries) |