By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,124 Members | 1,569 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,124 IT Pros & Developers. It's quick & easy.

how to read cell data line by line from excel using vb script in macro?

P: n/a
I had created a macro to read data from an excel sheet and write the
values to a text file. I had used "ActiveSheet.Range("GB" & k).Value"
command to read the values from the excel.

The issue is: some cells in the excel sheet is having two lines value
and four lines data, the text file is generating that value in a
single line. (Ex. the cell value in address column is in four lines
and should display in four lines in the text file generated from the
macro)

Can i do something in the excel sheet or in vb script to read the
address value line by line and write line by line in text file???

Please help me........

Regards,
Ashok

Mar 27 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If the Excel cell value has "hard" return/newline then those should also show up in your text file (unless you're stripping them).
Is the Excel data definitely multi-line or is it just wrapped?

--
Tim Williams
Palo Alto, CA
<as*******@gmail.comwrote in message news:11**********************@n76g2000hsh.googlegr oups.com...
I had created a macro to read data from an excel sheet and write the
values to a text file. I had used "ActiveSheet.Range("GB" & k).Value"
command to read the values from the excel.

The issue is: some cells in the excel sheet is having two lines value
and four lines data, the text file is generating that value in a
single line. (Ex. the cell value in address column is in four lines
and should display in four lines in the text file generated from the
macro)

Can i do something in the excel sheet or in vb script to read the
address value line by line and write line by line in text file???

Please help me........

Regards,
Ashok

Mar 27 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.