Newline character lost/corrupted after export/import

  • Thread starter Thread starter Brian Fielding
  • Start date Start date
B

Brian Fielding

After exporting a table containing text from Access 2007 to Excel 2007 all
newline characters are lost/changed. Looking at them in datasheet view they
are shown as "? inside square box" characters.

Is there any way to recover them ?

Thanks
Brian
 
ACCESS uses the combination of "carriage return" and "line feed" characters
to start a new line. EXCEL uses just the "line feed" character.

So you'll need to convert the ACCESS new line characters to the EXCEL new
line character, which means you'll need to use a query, based on your
table, to convert them and then export the query instead of the table.

Here is a generic example of such a query:

SELECT Field1, Field2, Field3,
Replace(Field4, Chr(13) & Chr(10), Chr(10)) AS Field4,
Field5, Field6, Field7
FROM YourTableName;
 
I needed to fix the data that had been imported (back) into Access and
Replace enabled me to do so.

Thanks for your help
Brian
 
Back
Top