[AccessD] Pulling Data from Excel into Access with "Automation"

Brad Marks BradM at blackforestltd.com
Thu Jun 30 16:02:03 CDT 2011


Steve,

Thanks for the help.

I used one of my Access test programs that pushes data into a new Excel spreadsheet to now also pull out the value of a single cell with the example that you provided.  This worked nicely.

How can I reference an Excel spreadsheet that already exists? (C:\Access_Excel_Tests\Test.xlsx) for example

Thanks,
Brad      



-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 'Steve Goodhall'
Sent: Thursday, June 30, 2011 3:26 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation"



	Yes.   

	Use the Cells collection of a Worksheet object.  So for example: 

	Dim vValue as Variant 

	vValue = oWS.Cells(4,4).Value  

	After that it gets complicated. 

	Regards, 
Steve Goodhall, MSCS, PMP 
248-505-5204

----- Original Message -----
 From:Access Developers discussion and problem solving 
To:"Access Developers discussion and problem solving" 
Cc:
Sent:Thu, 30 Jun 2011 13:57:48 -0500
Subject:[AccessD] Pulling Data from Excel into Access with
"Automation"

All,

I have started to experiment with pushing data from Access to Excel
via
"Office Automation". So far, these tests have gone nicely.

Now, I would like to experiment with pulling data from Excel. I know
that it is easy to simply link to an Excel file and obtain the Excel
data. However, I would like to know if it is also possible to pull
data
from Excel with Automation. For example, let's say that I have an
existing Excel spreadsheet and I simply want to obtain the contents
of
only cell "D4" and pull it into Access. Is this possible?

Thanks,

Brad 

-- 
AccessD mailing list
AccessD at databaseadvisors.com [1]
http://databaseadvisors.com/mailman/listinfo/accessd [2]
Website: http://www.databaseadvisors.com [3]


Links:
------
[1] mailto:AccessD at databaseadvisors.com
[2] http://databaseadvisors.com/mailman/listinfo/accessd
[3] http://www.databaseadvisors.com/

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





More information about the AccessD mailing list