472,122 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 software developers and data experts.

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

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
1 22020
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.

Similar topics

1 post views Thread by jabe | last post: by
4 posts views Thread by Hardy Wang | last post: by
2 posts views Thread by musa.biralo | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.