Import Export Problems

  • Thread starter Thread starter propolis
  • Start date Start date
P

propolis

Hi

Would like some advice please :D

I am importing a .csv file generated with excel. Now when I impor
this file into access, the text in my memo field has line breaks i
it. When access imports this files it ignores the excel line brea
codes.

The same happens when I export from access a .csv file

In excel and access the codes for line breaks are different.

Does anyone know of a workaround for this problem

Cheers :lol
 
Excel uses LF, Chr(10) for line breaks within cells, while Access uses
the Windows-standard CRLF, Chr(10) & Chr(13).

All you need do is run an update query after importing (or before
re-exporting) that uses the Replace() function to change the line
breaks, e.g.

UPDATE MyTable
SET MemoField = Replace([MemoField],Chr(10),Chr(10) & Chr(13));

On Thu, 16 Jun 2005 19:39:54 -0500,
 
Slight correction. Access uses Chr(13) & Chr(10), not Chr(10) & Chr(13)

UPDATE MyTable
SET MemoField = Replace([MemoField],Chr(10),Chr(13) & Chr(10))


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



John Nurick said:
Excel uses LF, Chr(10) for line breaks within cells, while Access uses
the Windows-standard CRLF, Chr(10) & Chr(13).

All you need do is run an update query after importing (or before
re-exporting) that uses the Replace() function to change the line
breaks, e.g.

UPDATE MyTable
SET MemoField = Replace([MemoField],Chr(10),Chr(10) & Chr(13));

On Thu, 16 Jun 2005 19:39:54 -0500,
Hi,

Would like some advice please :D

I am importing a .csv file generated with excel. Now when I import
this file into access, the text in my memo field has line breaks in
it. When access imports this files it ignores the excel line break
codes.

The same happens when I export from access a .csv file.

In excel and access the codes for line breaks are different.

Does anyone know of a workaround for this problem.

Cheers :lol:
 
Slight correction. Access uses Chr(13) & Chr(10), not Chr(10) & Chr(13)

UPDATE MyTable
SET MemoField = Replace([MemoField],Chr(10),Chr(13) & Chr(10))

Thanks, Doug. I must have been having a particularly left-handed moment.
 
Back
Top