Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Multiple Tables

Status
Not open for further replies.

HerickP

IS-IT--Management
May 10, 2000
68
US
Is there a way to import multiple excel spreadsheets into one Table instead of having to do every single one at a time??? Or import multiple spreadsheets into one Excel spreadsheet atthe same time??? please help!!
 
try creating a button on a form.<br>in the OnClick Property of the button, go into the Code Builder and put this code with modifications to fit your application:<br><b><br>DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, &quot;YourTableName&quot;, &quot;FirstSpreadsheetName&quot;<br>DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, &quot;YourTableName&quot;, &quot;SecondSpreadsheetName&quot;<br></b><br><br>you can do as many as you want (i believe), just make sure you put the path and file name of each spreadsheet in the expression, and the Access table name in.&nbsp;&nbsp;i haven't tested this, but it should work for you. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
WHAT ABOUT HAVING THE HEADINGS TAKEN OUT???? WHEN IT IMPORTS, IT ALSO IMPORTS THE HEADINGS....IS THERE A CODE NOT TO IMPORT THEM?
 
i believe if you put a &quot;,1&quot; after the end of each command line it will eliminate headings.<br>like:<br><b><br>DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, &quot;YourTableName&quot;, &quot;FirstSpreadsheetName&quot;,1<br></b><br><br>i'll double-check, if i don't repost, this is correct.<br> <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
i lied, it's &quot;-1&quot; not &quot;1&quot; <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top