473,386 Members | 1,846 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,386 software developers and data experts.

Export data from Excel to MS Access

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.Now 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 4607
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.Now 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 Expert 2GB
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
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.Now 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
hey priyammaheshwari.. 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 Expert 2GB
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.Now 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
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...
4
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...
6
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...
2
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...
5
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...
1
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...
1
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...
1
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,...
3
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...
3
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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...

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.