Macro to export access data to existing excel worksheet

PRodgers4284

Registered User.
Local time
Today, 23:05
Joined
Feb 17, 2009
Messages
64
I have a macro within my access database that exports data to an excel worksheet and this works great. However i now want to add data to an "existing" excel worksheet ie one that already has data in it from a previous export from access. Can this be done, if so can anyone point me in the right direction.
 
First of all, Do you want to add the data to new worksheet, the same worksheet? If the same worksheet, do you know which cell will be the first row and column?

Do you want to maintain the formatting of the existing worksheet for the newly appended rows?

Do a search for CopyFromRecordset for help on this topic.

David
 
First of all, Do you want to add the data to new worksheet, the same worksheet? If the same worksheet, do you know which cell will be the first row and column?

Do you want to maintain the formatting of the existing worksheet for the newly appended rows?

Do a search for CopyFromRecordset for help on this topic.

David


David,

I want to add data to an existing worksheet, ie if i have 10 rows in my worksheet, run the macro and add the data to row 11 and so on. I want to maintain the formatting of the existing worksheet for the new rows.
 
Ok, next question, what's your vba skills like?

This require vba code to do it.

Step one: create recordset based on the data you want to export to Excel.
Step two: use automation to open a session in Excel and the appropriate workbook.

Step 3: Determine the first available row
Step 4: use the CopyFromRecordset Recordset command to post the information into Excel.

Step 5:save the workbook, quit Excel, Close the recordset.

I do have code for doing this, not avialable to day but there are examples on this site on how to do this.

David
 
Does anyone know if the Export/Import to a text file will work with the Runtime 2007 ?

It works withing my Application on the machine I developed it on, but not on the Runtime Machine...

Basically I run a macro that calls the pre saved Export and/or Import file that I created with the export and import commands.

wan't sure if I had to somehome move those preconfigured export import files to the other machine ?

I also have one other issue that pertains to a button that calls a hyperlink with the on click command application.followhyperlink "the URL etc"

This also works on the machine developed on but not on the machine runing Runtime Version.

Is there a file I need to register on the other machine ?

thanks...
 
Does anyone know if the Export/Import to a text file will work with the Runtime 2007 ?

It works withing my Application on the machine I developed it on, but not on the Runtime Machine...

Basically I run a macro that calls the pre saved Export and/or Import file that I created with the export and import commands.

wan't sure if I had to somehome move those preconfigured export import files to the other machine ?

I also have one other issue that pertains to a button that calls a hyperlink with the on click command application.followhyperlink "the URL etc"

This also works on the machine developed on but not on the machine runing Runtime Version.

Is there a file I need to register on the other machine ?

thanks...

Way to hijack someone's thread. If you start your own thread people may be more inclined to help, just a suggestion...
 

Users who are viewing this thread

Back
Top Bottom