Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Este tema está ahora archivado y está cerrado a más respuestas.
Intento abrir un archivo CSV con una macro y quiero cambiar los paramentros de TextFileColumnDataTypes.
hice una macro con la que a través de las caracteristicas de cada columna puedo incluir en una variable los parematros que necesito, pero al abrir la QueryTables.Add, no se como suplir el array.
Los datos que incluye la variable son: MyVariable = "4,2,2,2,1,2,1,1"
With ActiveSheet.QueryTables.Add(Connection:= _
ImpFile, Destination:=Range("$A$1"))
' .CommandType = 1
.Name = "salidas_merc"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(MyVariable)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
agradeceré su apoyo para orientarme como hacer que este codigo funcione.
Gracias.