Results 1 to 5 of 5
  1. #1
    3 Star Lounger Omega3's Avatar
    Join Date
    Jan 2004
    Location
    Los Angeles, California, USA
    Posts
    343
    Thanks
    2
    Thanked 1 Time in 1 Post

    Output Query to Excel with cells Text Wrap (2003)

    I am outputting a query into an Excel 2003 spreadsheet. I am using this code to do it.

    DoCmd.OutputTo acOutputQuery, qdf.Name, "MicrosoftExcelBiff8(*.xls)", pFileName, False, "", 0

    When I opened the file all the cells with data have as a default
    You know it's time to diet when you push away from the table and the table moves.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Output Query to Excel with cells Text Wrap (2003)

    I'm not clear on why this is a problem, since the data is apparently all there. The only way I know of to deal with it is to preformat the spreadsheet or use automation to autofit the columns after the output.
    Charlotte

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Output Query to Excel with cells Text Wrap (2003)

    If you use TransferSpreadsheet instead of OutputTo, wrapping will be turned off.

  4. #4
    3 Star Lounger Omega3's Avatar
    Join Date
    Jan 2004
    Location
    Los Angeles, California, USA
    Posts
    343
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Output Query to Excel with cells Text Wrap (2003)

    Thanks Hans. I was glad this was a simple fix and glad to get rid of the text wrapping. Thanks again.
    You know it's time to diet when you push away from the table and the table moves.

  5. #5
    3 Star Lounger Omega3's Avatar
    Join Date
    Jan 2004
    Location
    Los Angeles, California, USA
    Posts
    343
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Output Query to Excel with cells Text Wrap (2003)

    Hi Charlotte. Thanks for replying. Hans was able to read my mind. TransferSpreedsheet did the job.
    You know it's time to diet when you push away from the table and the table moves.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •