Importing data from Excel with linfeeds in the cells...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a problem that I hope someone will be able to help me with. I am importing data into an Access table from Excel, where some of the cells in Excel have line-feeds in them (i.e. there may be a couple small paragraphs separated by a blank line). When I bring it into Access, those line feeds appear as square boxes when looking at the data in datasheet view and as heavy vertical lines when looking at it in form view. Any ideas on how to retain the actual linefeeds???

Thanks a lot!

(I'm using Office 2002)
 
EXCEL uses Chr(10) as the linefeed character (which is what it is) to start
a new line in word-wrapped cells. ACCESS uses the combination of Chr(13) and
Chr(10) (carriage return and line feed) to start a new line. So, run an
update query on your imported data to convert Chr(10) to Chr(13) & Chr(10).
In ACCESS 2000 and higher, you can do this with the Replace function.

--

Ken Snell
<MS ACCESS MVP>


Dan said:
I have a problem that I hope someone will be able to help me with. I am
importing data into an Access table from Excel, where some of the cells in
Excel have line-feeds in them (i.e. there may be a couple small paragraphs
separated by a blank line). When I bring it into Access, those line feeds
appear as square boxes when looking at the data in datasheet view and as
heavy vertical lines when looking at it in form view. Any ideas on how to
retain the actual linefeeds???
 
Back
Top