Selasa, 19 Desember 2017

Re: [MS_AccessPros] Importing Excel Data into a temporary table

 

Thank you for the reply Crystal.

I spent most of yesterday reading books and doing internet searches and came up with the VBA code necessary to import my Excel file.  I just got it working late last night so I am good now.

That is good to know about the internal tables.  I would never have thought to have even looked at them.

David


---In MS_Access_Professionals@yahoogroups.com, <strive4peace2008@...> wrote :

Hi David,

as for controlling the wizard dialog boxes, you cannot do that ... but you can use the specifications you can create there.

The tables that store import/export specs are:

MsysIMEXspecs
MsysIMEXcolumns

While you cannot modify the tables directly, you can use APPEND queries to add records to those tables -- and you can delete records from them directly. You can probably use UPDATE queries on them too, but what I usually do is

1. make-table from the columns of a spec using MsysIMEXcolumns
2. delete rows from MsysIMEXcolumns for a particular spec
3. modify specs
4. use APPEND query to write records back to MsysIMEXcolumns for a particular spec

---

> "the temporary table has the same field names as the columns

in the Excel sheet"

I think they need to be in the same order too -- you can use a query to do that if you don't want to change the table.

have an awesome day,
crystal


On 12/17/17 11:55 PM, david.pratt@... [MS_Access_Professionals] wrote:
Is there a way to view the import wizards background code so I can program a command button to perform the same steps the wizard is performing?

I am importing an Excel file with a single worksheet into the same temporary table each time.  the temporary table has the same field names as the columns in the Excel sheet.  

I have some code from a Programming by Example book, but I cannot get it to work.

Thank you, David



__._,_.___

Posted by: david.pratt@outlook.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar