Results 1 to 10 of 10
  1. #1
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199

    ExportWithFormatting using Excel 2007?!

    Hello,



    I'm using the ExportWithFormatting Macro but, strangely, it only lists Excel 2007 and not 2010 as an option. Moreover, the formatting is messed up when I export this way. Any ideas why 2010 or CSV isn't an option? See attached screengrab.Click image for larger version. 

Name:	export with formatting.png 
Views:	15 
Size:	18.6 KB 
ID:	18532

  2. #2
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    I'm assuming from your question that you do have Excel 2010 installed on your machine.

    Check your references in Access to make sure that you have the Excel 2010 checked, and available to be used by Access. (I don't know why missing 2010 would keep you from outputting to a CSV, though, so this may not be it.)

  3. #3
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    Hello Dal, thanks for trying. Yes I do have 2010 both Access & Excel. Which setting do you mean by my references in Access? thanks,

  4. #4
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    In Access, bring up the Visual Basic programming window (alt-shift-f11? or alt-f11?) and look under Tools -> References.

    Make sure the "Microsoft Office Automation" for your version of Excel... V14, I believe... is checked.

  5. #5
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    Dal,

    Thank you, but I don't see anything named "Microsoft Office Automation" in there. I tried selecting anything that looked close or was referring to Office v 14 but no luck.

  6. #6
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742

    Names of References to try

    Hmmm. There is a grand section of items that start with Microsoft. It should be somewhere in there - here's the ones I have checked. These are copied from my Excel 2010, since I don't have Access installed on this particular machine.

    "Microsoft Access 14.0 Object Library"
    "Microsoft Excel 14.0 Object Library"
    "Microsoft Office 14.0 Object Library"
    "Visual Basic for Applications"
    "OLE Automation"

    Hopefully this helps.

  7. #7
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    Hi Dal, truly appreciate your showing me that but I don't have an option for Excel 14.0 OL or OLE Automation. I'm guess this probably now a question for my IT department right?

    Thanks,

  8. #8
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Curious. Yes, I'd start there. Security may have locked something down regarding references and add-ins. Be sure to explain to them the actual root problem that you're trying to solve, the "export to CSV" problem, rather than just the latest question.

    Oh, by the way, I missed the Excel comment in your initial post, and focused on the CSV part. Format-wise, Excel 2010 uses the Excel 2007 format, so that's the right export to XLSX. However, I don't see Excel 2007 in the selection list you posted.

    What specific formatting is messed up with the export to XLSX?

  9. #9
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    Thanks Dal. Basically the data (sans the headers) in Excel are light grey font. I'd have to clear formats or change font to black. It's just a strange user experience.

  10. #10
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Okay, that's probably coming across from the format of the report that you are exporting.

    If you don't want to change the report itself, then it's easy enough to code a button to use VBA to export with formatting, then open the exported file and update the font color to black. Your choice.

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

Similar Threads

  1. Replies: 2
    Last Post: 07-13-2014, 07:32 AM
  2. Replies: 1
    Last Post: 02-04-2013, 05:52 PM
  3. ExportWithFormatting Error
    By voro in forum Import/Export Data
    Replies: 3
    Last Post: 10-29-2012, 09:29 AM
  4. Export Table in Access 2007 to Multiple Workbooks in Excel 2007
    By hutchinsm in forum Import/Export Data
    Replies: 5
    Last Post: 03-01-2012, 05:23 PM
  5. Replies: 0
    Last Post: 11-17-2009, 02:35 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