Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Upload Excel to Access

Hello.
I have an xls file that i want to append to an Access table that has an
autonumber field.
How can i upload this information from Excel to Access?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Upload Excel to Access

Presuming that your Excel table is the same structure as your Access table,
you should be able to append the Excel data to your Access table like so:

1) Open both your Excel worksheet and your Access database & table you wish
to append
2) Select and copy the Excel data (no headers).
3) Switch to Access, and while viewing the table you wish to update, select
"Edit, Paste Append" from the menu.

The copied rows/records will be appended and the autonumbered field will be
updated appropriately (overwriting any values that might have been in the
related Excel data).

-Glenn Ray
MOS Master

"Luis" wrote:

Hello.
I have an xls file that i want to append to an Access table that has an
autonumber field.
How can i upload this information from Excel to Access?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Upload Excel to Access

Ok, but i'd like to do it programatically.

"Glenn Ray" wrote:

Presuming that your Excel table is the same structure as your Access table,
you should be able to append the Excel data to your Access table like so:

1) Open both your Excel worksheet and your Access database & table you wish
to append
2) Select and copy the Excel data (no headers).
3) Switch to Access, and while viewing the table you wish to update, select
"Edit, Paste Append" from the menu.

The copied rows/records will be appended and the autonumbered field will be
updated appropriately (overwriting any values that might have been in the
related Excel data).

-Glenn Ray
MOS Master

"Luis" wrote:

Hello.
I have an xls file that i want to append to an Access table that has an
autonumber field.
How can i upload this information from Excel to Access?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Upload Excel to Access

Programmatically is tricky. Unless you are familliar with ADODB and
recordsets then you will be in way over your head. This is not a project for
the Newbie. That having been said if you are ok with ADO then with a little
searching on the web you should be able to get yourself started. After that
we would be more than happy to help you with any specific problems you might
have...

HTH

"Luis" wrote:

Ok, but i'd like to do it programatically.

"Glenn Ray" wrote:

Presuming that your Excel table is the same structure as your Access table,
you should be able to append the Excel data to your Access table like so:

1) Open both your Excel worksheet and your Access database & table you wish
to append
2) Select and copy the Excel data (no headers).
3) Switch to Access, and while viewing the table you wish to update, select
"Edit, Paste Append" from the menu.

The copied rows/records will be appended and the autonumbered field will be
updated appropriately (overwriting any values that might have been in the
related Excel data).

-Glenn Ray
MOS Master

"Luis" wrote:

Hello.
I have an xls file that i want to append to an Access table that has an
autonumber field.
How can i upload this information from Excel to Access?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Upload Excel to Access


Jim Thomlinson wrote:
I have an xls file that i want to append to an Access table


Programmatically is tricky. Unless you are familliar with ADODB and
recordsets


'Recordsets' may be a red herring here e.g.

Sub no_recordset_needed()
Dim con As Object
Set con = CreateObject("ADODB.Connection")
con.Open _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Tempo\New_Jet_DB.mdb"
con.Execute _
"INSERT INTO MyTable (data_col)" & _
" SELECT F1 AS data_col FROM" & _
" [Excel 8.0;HDR=NO;Database=C:\Tempo\db.xls;]" & _
".[Sheet1$B2:E65535];"
End Sub

Jamie.

--



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Upload Excel to Access


Markonni wrote:
There is simpler way to do this. You can make a link from

Access/tables view
to the Excel file.


The OP posted in .excel.programming then said, "i'd like to do it
programatically", so how about posting some *Excel code* to create the
linked table. Your approach is only simpler if operating on the same
Excel file each time.

Jamie.

--

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload an Excel file? Stan in South Africa Excel Discussion (Misc queries) 3 May 3rd 09 06:03 AM
why do my excel borders dissapear when i upload to www Debbie31 Excel Discussion (Misc queries) 0 December 9th 07 06:20 PM
Data Upload from Excel to SQL Server Duke Carey Excel Worksheet Functions 3 December 19th 06 05:49 PM
Data Upload from Excel to SQL Server Duke Carey Links and Linking in Excel 3 December 19th 06 05:49 PM
how to upload csv to excel? pinar Excel Programming 1 November 10th 04 11:07 AM


All times are GMT +1. The time now is 07:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"