Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2312
  • Last Modified:

Microsoft Access 2013 append data to Excel and/or CSV

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
--TripWire--
Asked:
--TripWire--
  • 2
  • 2
  • 2
2 Solutions
 
als315Commented:
You can't do it without VBA, where you can open Excel or csv file and append data.
0
 
--TripWire--Author Commented:
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
 
als315Commented:
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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
Gustav BrockCIOCommented:
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
 
--TripWire--Author Commented:
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
 
Gustav BrockCIOCommented:
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now