Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hello,
I try to export data from excel file, i would like to export multiple colonm, each colonm in a separate text file with. Is it possible to specify the names of the export file in the first row of each colonm thank you very much for your help Phil |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Phil:
Here is some sample data for columns A thru C: c:\test\birds.txt c:\test\animals.txt c:\test\flowers.txt sparrow dog rose robin cat lily quail mouse violet hawk flea snapdragon rat elephant moose The first row is the full filespec (path & name). Here is a very simple macro: Sub Column2File() ' gsnuxx Set fs = CreateObject("Scripting.FileSystemObject") For i = 1 To 3 n = Cells(Rows.Count, i).End(xlUp).Row fspec = Cells(1, i).Value Set a = fs.CreateTextFile(fspec, True) For j = 2 To n a.WriteLine (Cells(j, i).Value) Next a.Close Set a = Nothing Next Set fs = Nothing End Sub -- Gary''s Student - gsnu2007k " wrote: hello, I try to export data from excel file, i would like to export multiple colonm, each colonm in a separate text file with. Is it possible to specify the names of the export file in the first row of each colonm thank you very much for your help Phil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to export large amounts of text data into single reports | Excel Discussion (Misc queries) | |||
How can I export text from excel autoshapes to a text file? | Excel Discussion (Misc queries) | |||
Cell export to Text File? | Excel Discussion (Misc queries) | |||
export excel file as csv with text delimiter of " | Excel Discussion (Misc queries) | |||
Export excel file to semicolon delimited text file | Excel Discussion (Misc queries) |