Import filtered Data from Access to Excel (1 Viewer)

ootkhopdi

Registered User.
Local time
Today, 12:22
Joined
Oct 17, 2013
Messages
181
HI.

I have a huge database containing table with 300000 records,,

i want to import filtered data from this access table into excel
as filter by Month or Year

how can i do it..
 

Ranman256

Well-known member
Local time
Today, 02:52
Joined
Apr 9, 2015
Messages
4,339
In your query, set the criteria,
Then use
Docmd.transferspreadsheet....
 
Last edited:

Minty

AWF VIP
Local time
Today, 07:52
Joined
Jul 26, 2013
Messages
10,368
I suspect the OP wants to export to Excel having re-read his post.
Create a query that includes the filtered dates you want.
Then use DoCmd.TransferSpreadSheet to export the result of the query to the spreadsheet.
 

ootkhopdi

Registered User.
Local time
Today, 12:22
Joined
Oct 17, 2013
Messages
181
thanks to both Ranman 256 and Minty

but ur solution is Export Access database to Excel
while i want
IMPORT Data From Access into Excel

as

First i open an excel worksheet
then import data from access table
but this time i want to filtered data only which match with my requerements


hope i clear my problem ..


hoping to solution

thanks in advance
 

sneuberg

AWF VIP
Local time
Yesterday, 23:52
Joined
Oct 17, 2014
Messages
3,506
Try these step and see if that gets you in the right direction:

  1. Open Excel with a blank worksheet
  2. Click on the ribbon's DATA tab
  3. In the Get External Data section click on From Access
  4. Browse to the database you want to import from and click Open
  5. Select the query or table in the database (Create the query in the Access database to meet your filtering requirements)
  6. If you just want a table view then click ok on the Import Data dialog
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:52
Joined
Jan 20, 2009
Messages
12,851
Typically, if it were a fixed database you were connecting to you would use Get External Data on the data ribbon and set it to reload on opening. This can connect to a query or table or you can edit the Command type and Command Text in the Connection definition to execute any SQL.

If the database changes then you can change the Connection file and Connection String.

Another alternative is to use an ADO Connection and ADO Command to get a recordset from the database then CopyFromRecordset to write the data into a Range.
 

Ranman256

Well-known member
Local time
Today, 02:52
Joined
Apr 9, 2015
Messages
4,339
You can't do it that way.
You don't need it open to import to excel.
 

ootkhopdi

Registered User.
Local time
Today, 12:22
Joined
Oct 17, 2013
Messages
181
Thanks to all for suggestion and help

i do it with microsoft query option in data RIBBON...


select access database and some more steps..

i get my data...


thanks again to all
 

Users who are viewing this thread

Top Bottom