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

A

ashok0866

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
 
T

Tim Williams

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top