Results 1 to 6 of 6

Thread: Solved: Help writing excel spradsheet to txt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Solved: Help writing excel spradsheet to txt

    Hello,
    I am writing a macro that I need to write the content from one excel file to a newly created txt file. I can write lines to the text file, but the part I need help with might end up only being a line or two of code.
    Lets say I have 3 columns, Name, Age, and DOB with n number of rows in each.
    What is an easy way to write each row to the text file so it would look like :
    Name1, Age1, DOB1
    Name2, Age2, DOB2
    etc.

    So something like

    For numRows = 0 to n
    For each col
    String = String + col.Range(currentRow) + ","
    objTextFile.WriteLine (String)
    Next numRows


    Thanks!
    Last edited by SilverSN95; 12-18-2009 at 11:31 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •