How to export data from a form datasheet to excel via code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • syedshaffee
    New Member
    • Jan 2012
    • 91

    How to export data from a form datasheet to excel via code

    Hey people,
    I made a user interface that give's Users a filtered report in a Datasheet Format

    i want to give them a feature that they could export that Result .xls format How can i do that can some one help me
    Last edited by zmbd; Sep 10 '12, 04:51 AM. Reason: Removed un-needed code tags.
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    syedshaffee

    Several ways to solve this problem.
    Automation, docmd, etc...

    I find the easiest is to do a simple transferworkshe et method:
    There have been several threads on this site regarding this method and the the basic link:

    Please note that if you use this method and try "acSpreadsheetT ypeExcel10" it will cause you a headache... that's not a defined constant... replace that with just the number 10 for 2007/2010 formatted files.

    The correct answer depends on what you need for the user output.

    -z

    Comment

    Working...