import to excel a text file using cell value -
i have .txt output files import in excel.
ideally want use sheet1 index; write title, name of sheet , path , name .txt file. macro should create newsheet named cell , in sheet import corresponding .txt file.
i been trying record macros , changing vba code, far failures.
with activesheet.querytables.add(connection:= _ "text;c:\documents , settings\userxp\my documents\my dropbox\cippec\1-mira\procesamiento base\oede\tablas\trim\q_employ_pcia_23.txt" _ , destination:=range("$a$1")).name = "q_employ_pcia_23"
any idea?
thanks
with activesheet.querytables.add(connection:= _ "text;c:\documents , settings\userxp\my documents\my dropbox\cippec\1-mira\procesamiento base\oede\tablas\trim\q_employ_pcia_23.txt" _ , destination:=range("$a$1")) .name = "q_employ_pcia_23" .refresh backgroundquery:=false end activesheet.name = "q_employ_pcia_23"
works import new sheet , want name new sheet also.
Comments
Post a Comment