Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Exporting

Status
Not open for further replies.

estone4009

Technical User
Dec 31, 2001
39
US
I have an excel file that has one column and 39,980 rows. I need to take that and have it put it into a comma seperated file. Ex. A1,A2,A3,A4 I need all of these in a single line file.

Any ideas?

Thanks!
 

Code:
Sub test()
    For Each r In Range([A1], [A1].End(xlDown))
        s = s & r.Value & ","
    Next
    s = Left(s, Len(s) - 1)
    fNbr = FreeFile
    Open "c:\mytext.csv" For Output As #fNbr
    Write #fNbr, s
    Close #fNbr
End Sub

Skip,

[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top