Sub proceso() 'por luismondelo ruta = ActiveWorkbook.Path & "\" Open ruta & "ejemplo.txt" For Output As #1 Range("a2").Select Do While ActiveCell.Offset(0, 1).Value <> "" ubica = ActiveCell.Address Do While ActiveCell.Column < 75 If ActiveCell.Value <> "" Then lista = lista & "|" & ActiveCell.Value End If ActiveCell.Offset(0, 1).Select Loop lista = Mid(lista, 2, Len(lista) - 1) Print #1, lista lista = "" Range(ubica).Offset(1, 0).Select Loop Close #1 MsgBox "Se ha creado el txt en la ruta: " & ruta End Sub
miércoles, 13 de diciembre de 2017
Macro Exportar a txt
Suscribirse a:
Comentarios de la entrada (Atom)
Macro Exportar a txt
Sub proceso () 'por luismondelo ruta = ActiveWorkbook.Path & "\" Open ruta & "ejemplo.txt" For Output As ...
-
--Creamos una tabla temporal con un campo clave de tipo integer identity DECLARE @Tmp_Cliente TABLE( Id int identity(1,1) not null pri...
-
declare @columns nvarchar(MAX), @sql nvarchar(MAX) SET @columns = STUFF(( SELECT ',' + QUOTENAME(campo) FROM (SELECT DIST...
-
Sub proceso () 'por luismondelo ruta = ActiveWorkbook.Path & "\" Open ruta & "ejemplo.txt" For Output As ...
No hay comentarios.:
Publicar un comentario