Results 1 to 12 of 12
  1. #1
    jamesz is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    16

    remove unwrap text

    Hi everyone,



    I have one question here.How to remove unwrap text after exporting report from Access to Excel?

    Thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    I have never had to export report to Excel. What is 'unwrap text'?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jamesz is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    16
    sorry for mistake question above. actually how to remove wrap text,means how to unwrap text? when i export it into excel,it will appear in big space n waste so much pages when print it,since I want end user convenience with my system, I want my system (means Access) automate unwrap text when exporting it into system,end user no need to edit it at excel since they have really big databases.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    Probably depends on what is causing the text to 'wrap'. Are there embedded carriage returns in the text? Is the Excel cell formatted for wrapping?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    jamesz is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    16
    Yes,it is formatted into wrap text.i try to find wrap text property at access but i didn't find it,maybe it is related to Excel matter.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    There isn't a wrap property in Access. Text just always wraps. Something in the export must trigger Excel to set the cells wrap checked on. Haven't been able to replicate that behavior. Do you want to provide project?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    jamesz is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    16
    is there another way to attach file as my database is only 700kb? because when i want to attach it,it only allow 500kb.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    Zip with Windows Compression. 2mb zip allowed.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    jamesz is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    16
    This is sample of data.
    Attached Files Attached Files

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    I just ran that export macro. Text in the cells are not wrapping but the rows are sized taller than needed. Has something to do with item_desc field that has comma separated text string. I removed that field from the report and the spreadsheet rows are normal height. Controlling this will require VBA that opens the new spreadsheet and resets the row height.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    jamesz is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    16
    ok,may i know vba code? i also try .wraptext=false but it is still same as before.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,621
    Wrapping is not the issue, it is row height. You need code to open the Excel file. Common topic, here is one reference: http://p2p.wrox.com/excel-vba/10510-...-file-vba.html

    Then you need to set row height.

    So something like:
    Dim oExcel as Excel.Application
    Dim oWB as Workbook
    Set oExcel = new Excel.Application
    Set oWB = oExcel.Workbooks.Open(<pathToWorkbookHere>)
    oWB.Worksheets("Sheet1").Cells.EntireRow.AutoFit
    Last edited by June7; 03-17-2012 at 12:36 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Remove/Ignore beginning of text file on import
    By Insyderznf in forum Import/Export Data
    Replies: 9
    Last Post: 10-24-2011, 04:56 PM
  2. Try to remove everything to the right of SF
    By murphy in forum Queries
    Replies: 2
    Last Post: 09-15-2011, 03:20 PM
  3. Anyone help me Remove password
    By nht2007 in forum Security
    Replies: 2
    Last Post: 11-02-2010, 09:20 PM
  4. Replies: 20
    Last Post: 09-18-2010, 02:31 PM
  5. How to remove duplicates
    By TonyBender in forum Access
    Replies: 0
    Last Post: 10-21-2009, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums