![]() |
Import text file : why do fractions in text format result in month/day?
If I manually import a .txt file with the DATA menu "Import Text File"
and specify column 1 as text and columns 2, 3 and 4 as general I get de result I wanted. Fractions like 10/15 are shown as such. I recorded this proces and , except for the first 2 lines, the code I read is this : Main.Worksheets.Add(After:=Worksheets(Worksheets.C ount)).Name = "Import" With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & FTO, Destination:=Range("B1")) .Name = "VanHool4_1" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = xlWindows .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileOtherDelimiter = "!" .TextFileColumnDataTypes = Array(2, 1, 1, 1) .Refresh BackgroundQuery:=False End With Then I wrote a sub where I added the first 2 lines ; the rest I just pasted underneath. It works fine but SOME ratios in column 1 , like 10/15 , now show like oct/15 which I don't want. Could anyone help me here? I really need that original 10/15 as text. Thank you very much for any input. Herman |
All times are GMT +1. The time now is 04:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com