Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Access Export Query newline characters appear in Excel

Latest post Thu, Jun 18 2009 2:10 AM by Nick Hodge. 3 replies.
  • Tue, Jun 16 2009 9:23 AM

    • Steve C
    • Top 500 Contributor
    • Joined on Mon, Jun 8 2009
    • Posts 3
    • Points 63

    Access Export Query newline characters appear in Excel

    I have an Export Query set up in Access 2007 (linked to SQL Server 2005 tables), which exports to an Excel 2007 spreadsheet. On my PC, it displays correctly, but on another user's it shows the newline characters (or 'carriage returns', in 'memo' fields) as small boxes, which also print. Whilst I could write some VB to remove them from the spreadsheet, it occurs to me that there must be some setting that is different between the two PCs, which are both running the same version of Office 2007. Mine is running Vista Business, and the other XP, but I think the problem is also apparent on another Vista PC.

    I have found numerous routines for replacing Chr(10) and Chr(13), but nothing about this apparent discrepancy between similar setups.

    Any ideas?

    • Post Points: 21
  • Wed, Jun 17 2009 1:43 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 543
    • Points 9,287
    • MVP

    Re: Access Export Query newline characters appear in Excel

    Steve

    I would be staggered if the CrLf character is not there in both cases. I would suspect either a code page issue during the import that is not showing it or simply the font being used in the different versions where one doesn't have a representation of that character

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    • Post Points: 21
  • Wed, Jun 17 2009 3:21 AM In reply to

    • Steve C
    • Top 500 Contributor
    • Joined on Mon, Jun 8 2009
    • Posts 3
    • Points 63

    Re: Access Export Query newline characters appear in Excel

    Nick,

    I checked the other PCs this morning, and found that in fact the other Vista PC does NOT have this problem - it's just the XP one, which does suggest a code page issue. The font used is the same (Arial).

    I have also saved the file on the XP machine and can confirm that the newline characters do NOT appear when opening the same file on a Vista PC.

    The question is, is there a simple way of adjusting the XP code page to fix this?

    Thanks for your response.

    Filed under:
    • Post Points: 21
  • Thu, Jun 18 2009 2:10 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 543
    • Points 9,287
    • MVP

    Re: Access Export Query newline characters appear in Excel

    Steve

    I think you should have the ability to set that when you set up the connection to the database. Equally you should be able to look at it restrospectively by looking at the ODBC connection in control panel or OLEDB connection file if using that technology.

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    • Post Points: 5
Page 1 of 1 (4 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.