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

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

am 27.03.2007 15:11:47 von 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

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

am 28.03.2007 01:37:41 von 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?

--
Tim Williams
Palo Alto, CA


wrote in message news:1175001106.981098.114830@n76g2000hsh.googlegroups.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
>