473,804 Members | 3,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export data from Excel to MS Access

7 New Member
Hi all,

I have a MS Access database in which requests made by people is stored,but a coulmn for cost is left empty which is suppose to be populated by the administrator.N ow the administrator wants that there should be some functionality by which he would just have to upload an excel file containing the name and cost per person and the cost should be populated in access database against the respective name of people.
I am not able to figure out how i can use ASP to add this functionality to the website.I would be grateful if you could help.

Thanx
Sep 2 '08 #1
5 4621
priyammaheshwari
7 New Member
Hi all,

I have a MS Access database in which requests made by people is stored,but a coulmn for cost is left empty which is suppose to be populated by the administrator.N ow the administrator wants that there should be some functionality by which he would just have to upload an excel file containing the name and cost per person and the cost should be populated in access database against the respective name of people.
I am not able to figure out how i can use ASP to add this functionality to the website.I would be grateful if you could help.

Thanx
Sep 2 '08 #2
jhardman
3,406 Recognized Expert Specialist
That is a tricky one. It would be easier if he typed his data into the ASP app and that updated both his excel sheet and the access db.

However, if that isn't an option, do an upload and open the excel file using an excel db driver, get your info and put it in the access db. Let me know if you need any help with the actual code.

Jared
Sep 3 '08 #3
priyammaheshwari
7 New Member
Hi all,

I have a MS Access database in which requests made by people is stored,but a coulmn for cost is left empty which is suppose to be populated by the administrator.N ow the administrator wants that there should be some functionality by which he would just have to upload an excel file containing the name and cost per person and the cost should be populated in access database against the respective name of people.
I have figured out how to pick up data from excel sheet and populate access's respective fields with it,but i am not able to upload a excel file on the server.

Please if any body could give me a simple code to upload a excel file onto the server i would be really grateful.

I was wondering if instead of uploading the file i could directly pick up data from excel file on client's computer .please suggest some changes in the following code to do the same.

Expand|Select|Wrap|Line Numbers
  1. Set conn=Server.CreateObject("ADODB.Connection")
  2. strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
  3. Server.MapPath("test.xls") & ";" & _
  4. "Extended Properties=""Excel 8.0;HDR=Yes;"";"
  5. conn.Open strConnection
  6. Set rs = Server.CreateObject("ADODB.recordset")
  7. strSQL = "SELECT * FROM [Sheet1$]"
  8. rs.open strSQL, conn, 3,3,1
  9. rs.MoveFirst
  10.  
Thanx
Sep 11 '08 #4
Ugene
14 New Member
hey priyammaheshwar i.. are u also trying to read your figures from microsoft excel ? that code is unable to run or what ?because i am also trying to read my figure from excel...
Sep 12 '08 #5
jhardman
3,406 Recognized Expert Specialist
Hi all,

I have a MS Access database in which requests made by people is stored,but a coulmn for cost is left empty which is suppose to be populated by the administrator.N ow the administrator wants that there should be some functionality by which he would just have to upload an excel file containing the name and cost per person and the cost should be populated in access database against the respective name of people.
I have figured out how to pick up data from excel sheet and populate access's respective fields with it,but i am not able to upload a excel file on the server.
Thanx
Priya,

ASP files are not given access to client's file system for security reasons, so no, you can't do that. But uploading a file is easy enough, this article in the howto section explains how. Why are you unable to upload files? Do you have permission to save files in a temp folder on the server?

Jared

BTW, this really is a continuation of the question you were asking earlier, so I merged them.
Sep 15 '08 #6

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

Similar topics

1
17421
by: Steven Stewart | last post by:
I have a user who has been using Excel for a while to keep statistics and print reports. She finds using it cumbersome because of long formulas and a lot of copying and pasting. I have designed a database for her which is intended to make things a lot easier; however, I don't have a lot of experience with Access and I find that designing the reports in Access is tedious. I want to be able to print the reports (which are simply based on...
4
3135
by: Gary Wright | last post by:
I have an Access 2K database split into front and back. Quite often the users want to do some data analysis that I have not created a report for so they want to export some subset of the data into and Excel spreadsheet. Since the data often comes from many different tables, I have decided to create a temporary Access table, put all the data into it then use the Docmd.TransferSpreadsheet command to output the table to a spreadsheet. In...
6
13145
by: Robin Cushman | last post by:
Hi all, I need some help -- I'm working with an A2K database, using DAO, and am trying to read records into a Crystal Report and then export it to a folder on our network as an Excel spreadsheet. I'm having trouble with my code at the point at which it hits ".ReadRecords" -- the module just runs and runs without generating anything. I've gotten this code to correctly save .rpt files without any data, but not with data, nor have I been...
2
4706
by: PerryC | last post by:
Is there a way to export an MS Access Report to Word/Excel that looks EXACTLY like it appears in Access? When I export to Excel, only certain data appears, titles, headings... all missing. The format is not aligned... When export to Word, all my lines (table lines) are gone, making it hard to read. Thanks. Perry
5
4092
by: Jonny | last post by:
Hello, I have created a button on my form which when pressed does the following : 1) Run a pre-defined Macro, which is picking up a query and running my data to excel. However, I need the data to export into Excel in a certain format, i.e it needs to begin importing at cell A4, and in truth it would be great
1
9780
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm having I'd be most appreciative. The database is already constructed, I'm just wanting to export the data to an excel file. In short, I'm hoping to export two Tables (or queries...not sure which to use - they both seem to have the same data) in...
1
10513
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am trying to export to Excel using a command in an Access Form. RowID strFY AccountID CostElementWBS 1 2008 1 7 2 2008 1 7 I want to...
1
2326
by: Pauline | last post by:
Dear all, I have an enormous database (Access 2003) containing sales information, and an Excel tool to enable end users to do planning and forecasting. Untill now I would create several queries, export the data to Excel (Excel 2003) and store the Data in the tool for the users to work with. I always have to export all information for a group of users as I never know on what part of the data they want to work. This makes the Excel files very...
3
8457
by: StevoNZ | last post by:
I've been using Access to export data to Excel all year... this data has been increasing in size as the project nears compleion and now I find that when I export a table (or query) to Excel using the OfficeLinks Tools option "Analyze it with MS Excel" I receive an error message complaining about row limitations. We're only talking about 16,000 - 18,000 rows. I know that Excel can handle ~64,000 rows when just working within that application....
3
7168
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this file but save it as an excel file. The data in this excel file will be imported into an Access database. The
0
9707
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10586
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10323
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.