ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   importing data from Access (https://www.excelbanter.com/excel-programming/355619-importing-data-access.html)

perky2go

importing data from Access
 
I have two mdb's set with macros to import text files, massage the data, and
then export the resulting tables to several worksheets inside two existing
Excel files--e.g., the data from Access table "Medicaid Data" gets exported
to worksheet "Medicaid_Data" on Radiology.xls using TransferSpreadsheet. I
have another worksheet in the Excel file ("Data") that is filled with
index/match formulas which point to "Medicaid_Data" so that "Data" serves as
the graph datasource and updating "Medicaid_Data" succeeds in updating my
graph without my having to rewrite the formulas each month and also keeps the
source data with the final report for reference. This worked great last
month and in testing....

But now, while one of the Access macros is still behaving as I expected, the
other one is now creating new worksheets (e.g., "Medicaid_Data1") rather than
replacing the data on "Medicaid_Data".

Why am I now getting worksheets added with new names (xxx1) rather than
updating the existing worksheet with new data? (And why does it work in one
Access/Excel combo but not the other??)

With TransferSpreadsheet I have specified:
Transfer Type: Export
Spreadsheet Type: MS Excel 97

In both cases, I am exporting the contents of Access tables created via Make
Table queries.

Thanks for any insight!


tony h[_82_]

importing data from Access
 

A look at the code would be useful to get an answer. Need the bit where
you open the spreadsheet and send the data.
Also do you have the spreadsheet used as a linbked table source in the
Access database?

regards


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=520829



All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com