Macro: Transferspeardsheet action in Access

spatel

New Member
Joined
Sep 22, 2004
Messages
14
When using the "Transferspreadsheet" action in a macro, how do you specify certain columns to be imported from a .xls sheet.

I just want to import certain columns form a excel spreadsheet and into an access table. How do you specify that in a code not by the properties in the macro. The range argument grabs certain amount of range but in my case that may vary.

I just want specific columns from .xls sheet to be imported in a access table.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
spatel

I don't think it is possible to do what you want without doing something in Excel to identify which range you wish to import.

From Access help, TransferSpreadsheet syntax:

range A string expression that's a valid range of cells or the name of a range in the spreadsheet. This argument applies only to importing. Leave this argument blank to import the entire spreadsheet.

So you could name the range in Excel and use it as the range argument in the TransferSpreadsheet.
 
Upvote 0
Could you do that?? What i want is capturing entire row of the selected cell and recording the row in access. Any ideas??

thanks,
fz
 
Upvote 0

Forum statistics

Threads
1,221,814
Messages
6,162,135
Members
451,744
Latest member
outis_

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top