Share via

Carriage Returns in Access Fields

Phil S 261 Reputation points
2021-07-23T14:33:47.943+00:00

Hi All

I have exported data from an old FoxPro database via Access into Excel format.

The problem I have is that some of the cells contain descriptive text containing carriage returns.
For the shorter paragraphs that doesn't seem to be an issue, but some extend to 50 separate lines of text.
(There is really a good reason for these entries to be in the current list style format, as they describe technical specifications of equipment items)

This seems to cause a problem with viewing, previewing and printing the content e. g. only perhaps 25 lines being displayed without the option to stretch the cell further; printing being split over 2 pages etc.

Other than manually editing the text in these, is there an elegant solution to this problem please?

Thanks

Phil

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

3 answers

Sort by: Most helpful
  1. Emi Zhang-MSFT 30,196 Reputation points Microsoft External Staff
    2021-07-26T07:20:21.673+00:00

    Hi @Phil S ,
    How did you export FoxPro data to Excel? Did you use any command?
    Did you export to Access first and then export Access to Excel?
    What kind of file format did you use for Excel?
    I suggest you check if this problem appear in all data source, you can test FoxPro data to Excel directly and Access data to Excel directly, and check the result.
    Try to provide more detail information and steps about your problem, and I'm glad to help you.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Phil S 261 Reputation points
    2021-07-26T07:49:50.97+00:00

    Hello @Emi Zhang-MSFT

    Thanks for your response.
    The history is that I do not have access to the FoxPro program itself, although I do have have examples of hard copy that have been output from it in the past.
    The reason for the field having so many returns is that this is a long description of a complicated technical item.
    Looking at the hard copy, the returns (or line formatting) were included to control the layout of the generated output. The output from FoxPro was in the form of a crudely structured text file.

    I have imported the table data from the FoxPro data files using an old XP machine running Access 2003. I had no success trying to import using the current 2016 Access, even though I was using the same ODBC driver.
    Once in Access 2003 I opened in 2016 and saved in current format.

    Finally, to generate the Excel output, I used "DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9"

    So, I do not believe this is a data source problem, but simply the original format being carried through from FoxPro to Excel.
    The question I have is what I can do to make this result more manageable in Excel.

    Thanks

    Phil

    Was this answer helpful?


  3. Phil S 261 Reputation points
    2021-07-23T14:38:30.783+00:00

    Maybe should amend the title to "Carriage Returns in Excel Cells" !!

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.