Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Bristol, Avon, England
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Import Text from Excel with line breaks (2003)

    I am importing data from Excel into Access. In excel I have a field which users enter new lines by using Alt + Enter. When the data gets imported into access the line breaks disappear and the text runs into itself.

    Is there a way of either importing the line breaks or delimiting the text in some way?

  2. #2
    2 Star Lounger
    Join Date
    May 2002
    Location
    Bristol, Avon, England
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import Text from Excel with line breaks (2003)

    I have found an answer to this - so just to keep the post up to date

    To make it work I run an update query on the field with the line breaks (ImportField) and use the replace function in the update to crieria as below.

    Replace([Importfield], Chr(10), Chr(13) & Chr(10))

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Import Text from Excel with line breaks (2003)

    As you have found, Excel uses only the line feed character (ASCII 10) to indicate a line break, while Access uses carriage return + line feed (ASCII 13 and ASCII 10).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •