473,394 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Can you please help. I need to import/Link excel sheet(specific range)in ms access us

3
Can you please help. I need to import/Link excel sheet(specific range)in ms access. The range varies everytime we get the new excel sheet due to addition and deletion of records so want to make the range dynamic and import the rows contain data only.
Jul 25 '14 #1
3 1061
twinnyfo
3,653 Expert Mod 2GB
What have you tried so far?

With constantly changing ranges in Excel, this sounds like a strange thing to do, as how will you tell the DB what the values represent?

I think your first step is to standardize the spreadsheet format first--this will make your import much easier.
Jul 25 '14 #2
Exlq
3
Thanks for the response. I have tried to name the range in excel and while creating linked table using "DoCmd.TransferSpreadsheet" selected the same range in "Show Named Ranges" but when my excel spreadsheet changes, the rows get changed (columns remain unchanged) and it either add blank rows in linked table or do not pick the rows that exceed the set range. Please help
Jul 27 '14 #3
zmbd
5,501 Expert Mod 4TB
Are you using named ranges in the worksheet?

For example:
Expand|Select|Wrap|Line Numbers
  1. Sub zimportrangename()
  2. DoCmd.TransferSpreadsheet _
  3.     transfertype:=acImport, _
  4.     spreadsheettype:=acSpreadsheetTypeExcel12, _
  5.     tablename:="TestInput", _
  6.     FileName:="C:\Users\myusername\Documents\book2.xlsm", _
  7.     HasFieldNames:=False, _
  8.     Range:="importme"
  9. End Sub
Now no matter where the data is, one can simply name the range "importme" (or what have you) and the date will transfer to the table...
NOTE: you will need to validate the field values etc... which is the downfall. I usually import into a testing table that has some generic text fields and then parse the imported data for numerics etc...

Your other option is application automation wherein you could open an instance of the workbook and then search for your data... sortof kludgy though... like a 20#Maul for a carpet tack.
Jul 28 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Fred | last post by:
Hi. How do I import while mapping an excel table to an access table please??? I've searched around and all I can find is a software product or code that does the same thing as the access...
9
by: Edward S | last post by:
I budget for a Project in an Excel sheet as illustrated below. The months below are usually a 2 year period i.e. 24 months, though it could be over 24 months depending upon a Project. I then...
3
by: OhMyGaw | last post by:
Hello Excel/automation Gurus, I am working on an application where I have to keep a centralized database of all macros distributed to user and save the changes back on a nightly basis back to...
1
by: Jimmy | last post by:
Dear All! Our application uses resource files for localization. I'd like to be able to export those RESX files to MS Excel and back, that is - in both directions. I'm looking for advice for...
3
by: theodorej | last post by:
......how do I select multiple Excel files to import into Access? Any insights would be deeply appreciated.
3
by: flo | last post by:
Hi there: I m trying to install sharepoint, but cant because it requires that ASP.NET v2.0 is enabled in IIS, in there i can see IIS v1.143.. and downloaded microsoft visual web developer 2005...
1
by: DThreadgill | last post by:
I have a spreadsheet with about 35 tabs that I need to import into one table in Access. I found this link http://www.thescripts.com/forum/thread650662-import+multiple+tabs.html and changed some...
4
by: acc2ess | last post by:
Hello, My problem is that I receive different Word Documents as attachments and I need to get its data into the corresponding tables in access. I have used Text Form Fields in Word...
1
navanova
by: navanova | last post by:
Greetings, I have a problem of opening ms word and excel files on my computer. The files are there for a long time. I use to open and modify them. Suddenly, when i try to open the word files, a...
7
by: butler808 | last post by:
Hello, I am struggling to import multiple spreadsheets into an Access table. I have "borrowed" the code from the 'net and tailored it slightly. I am using Access 2013. Code is as follows: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.