ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   opentext (https://www.excelbanter.com/excel-programming/360855-opentext.html)

Neia

opentext
 
I wrote the code below to open a txt file.
Workbooks.OpenText Filename:="C:\Meus documentos\auxilio
transporte\BS.txt", _
Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=True, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1,
1), _
Array(2, 1), Array(3, 1), Array(4,4), Array(5, 4), Array(6, 1),
Array(7, 1)), _
TrailingMinusNumbers:=True

There is some problem with the data fields because some rows appears as I´d
like to see (03/mai/06 - format dd/mmm/yy) and others rows, from the same
colomn, appears: 03MAI2006 (format general).
This problem disapear if I use macro in excel 97 or if i open the text file
manually.


All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com