Solved

Microsoft Access 2013 append data to Excel and/or CSV

Posted on 2013-06-08
6
2,161 Views
Last Modified: 2013-12-12
Hello,

I'm using Microsoft Access 2013 over a network.
There is an option in Access that allows you to export data from a query into an Excel file using a wizard.  This option works fine for me.  However, after the export, I would like the option to return later and append data to that same Excel file.

In other words, let's say the data exported looked like this:

Dog
Cat
Mouse

I want Access to bring up this same query at a later date with updated information and append it to that same Excel file.  So if the most recent data added to the table/query included "Elephant" and "Snail", the same Excel file will now look like this:

Dog
Cat
Mouse
Elephant
Mouse

Is there a way to do this using the current Access options, or does it have to be done another way somehow?

Thanks.
0
Comment
Question by:--TripWire--
  • 2
  • 2
  • 2
6 Comments
 
LVL 39

Expert Comment

by:als315
Comment Utility
You can't do it without VBA, where you can open Excel or csv file and append data.
0
 

Author Comment

by:--TripWire--
Comment Utility
In that case, is there a button that I can add to my DB that will mock the export action and add an append feature?
What would that look like?
0
 
LVL 39

Expert Comment

by:als315
Comment Utility
No, there is no ready button, you should code it in VBA. If you upload sample of your files, we can do it. Csv is text file and code will be like this one:
#a38181469
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 49

Accepted Solution

by:
Gustav Brock earned 360 total points
Comment Utility
It would be easier to have a local Access table where you append the data.
Then, when needed, export that table with the full dataset to Excel. It will then overwrite a previously created worksheet.

Do have in mind, that Access will always export to the firstly created worksheet of the Excel workbook no matter where this later may be positioned. Thus, if you create a second worksheet and move that to the first position, Access will now export to what looks like the second worksheet.

/gustav
0
 

Author Comment

by:--TripWire--
Comment Utility
Thanks Gustav.
Is there a way to place a macro button on the toolbar menu, so that the user who views the report can just click a button to do this?
0
 
LVL 49

Assisted Solution

by:Gustav Brock
Gustav Brock earned 360 total points
Comment Utility
That would be to the ribbon, but that's not so very easy:

http://msdn.microsoft.com/en-us/library/office/ff196428.aspx

I would find another route like one button to open the report, another to run the export.

/gustav
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now