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

Discussion in 'ASP General' started by ashok0866@gmail.com, Mar 27, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

  2. Tim Williams Guest

    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:...
    > 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
    >
     
    Tim Williams, Mar 28, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tk
    Replies:
    3
    Views:
    7,322
    Oliver Wong
    Jul 11, 2006
  2. sajithkahawatta

    read a excel sheet using aspose.excel

    sajithkahawatta, Apr 19, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    599
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Apr 19, 2007
  3. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,597
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  4. Thomasa Gregg
    Replies:
    1
    Views:
    178
    Eliyahu Goldin
    Jun 9, 2004
  5. Andy

    Appending data to an excel cell using .NET

    Andy, May 21, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    131
    Mike Smith
    Jun 17, 2004
Loading...

Share This Page