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!