Access to Excel Export (1 Viewer)

ECEstudent

Registered User.
Local time
Today, 11:17
Joined
Jun 12, 2013
Messages
153
Hi guys, I am really stuck on this and I would appreciate any help. What I have been doing in my code so far is importing an Excel sheet's data into an Access table in order to use the values imported for calculations. The end result of this code and all of the calculations in it, is a value named 'Item Quantity'. But now I want to take the next step and instead of the user manually taking each item quantity that matched with the values imported from excel and putting them into their correct places in the same Excel file that was imported at the beginning, I want to automate that process. So to be more clear, I need to export back those resulting item quantity values back into that same Excel file under column 'Installed Base' and row...well, I'd be also having to collect the row that the imported values were imported from.

For example:

If I imported 3 values from that table and the first of those values was collected from row#3, then the item quantity would be exported to (of course a different column called) 'Installed Base' but the row would stay the same.


Any advice? I found this good source but I think you have to already know the row that you are exporting the values to. I wouldn't know, bc I'd be automatting the process as well as with each different excel file, different row values are getting imported/exported to.
 

namliam

The Mailman - AWF VIP
Local time
Today, 20:17
Joined
Aug 11, 2003
Messages
11,695
Why not make a "simple" query that will hold the values you found (and didnt find) and export that back to the excel basicaly overwriting the file you imported but with the additional data in it.

Utilizing i.e. the Docmd.Transferspreadsheet
 

ECEstudent

Registered User.
Local time
Today, 11:17
Joined
Jun 12, 2013
Messages
153
But doesn't that mean it'll take longer for my program to compile bc it'll be importing/exporting even more data (data that I may never even use in that code)? Wouldn't it be easier to focus on just a few columns and just export the related values out to them?

By a simple query you mean just create a query manually and instead of outputing my itemquantity values to the Excel file just export it there and the user can just manually export the query into the excel file? Isn't there another shortcut?
 

Users who are viewing this thread

Top Bottom