sk_uc04
10-31-2007, 04:35 PM
Hello everybody,
I am new to Excel VBA. I am trying to read a text file in which columns are separated by commas, for eg:
1,2,3
2,3,4
3,4,5
4,5,6
I want to write this to an Excel worksheet. Final Excel sheet should have 3 columns and 4 rows(number of rows depends on on how many entries we have in a text file). So the worksheet will look like:
1 | 2 | 3
2 | 3 | 4
3 | 4 | 5
4 | 5 | 6
I would really appreciate if one could help me with that. Also, I have another question. When we are reading from a Text file and writing to an excel sheet, can we specify programmatically which row or column should the entry go to. For eg... looking at my text file, can I specify that the first coulmn should populate from B9:Bx (where x is the number of rows in the text file).
Thanks for your help in advance.
Regards,
SK
I am new to Excel VBA. I am trying to read a text file in which columns are separated by commas, for eg:
1,2,3
2,3,4
3,4,5
4,5,6
I want to write this to an Excel worksheet. Final Excel sheet should have 3 columns and 4 rows(number of rows depends on on how many entries we have in a text file). So the worksheet will look like:
1 | 2 | 3
2 | 3 | 4
3 | 4 | 5
4 | 5 | 6
I would really appreciate if one could help me with that. Also, I have another question. When we are reading from a Text file and writing to an excel sheet, can we specify programmatically which row or column should the entry go to. For eg... looking at my text file, can I specify that the first coulmn should populate from B9:Bx (where x is the number of rows in the text file).
Thanks for your help in advance.
Regards,
SK