473,661 Members | 2,484 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open excell file with asp

2 New Member
hello sir,
i need to know the code in asp,which fetches data from excel files and transfers it to access database or postgresql,as per the requirements of the user?
Jan 23 '07 #1
1 1217
jhardman
3,406 Recognized Expert Specialist
if the excel file is set up right, you can connect to it as if it was a database:

Expand|Select|Wrap|Line Numbers
  1. dim connect, query, book, file
  2. file = "/book1.xls"
  3. set connect = server.createobject("ADODB.connection")
  4. connect.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source="&_
  5.    server.mapPath(File)&"; Extended Properties=Excel 8.0;"
  6. set book = server.createobject("adodb.recordset")
  7.  
then you can access the data as if it was a db, and deposit it in a second database using a separate db connection.

Please let me know if this was helpful.
Feb 7 '07 #2

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

Similar topics

2
1369
by: Robert Halstead | last post by:
Hi guys, I have a asp.net web app and it's connecting to an excell 2003 document (in another folder) via OleDataAdapter. Everything works and all, it's just that when I shutdown IE and try to access the excell document, asp.net seems to still keep it and won't release it. Excell gives some error saying it can't access it, but It's when I terminate the asp.net process in the task manager that the file is then released. I'm wanting to...
0
801
by: Sam | last post by:
Hi All, I would like to know if it is possible to group three excell files with only one worksheet inside each file into one excel file with three worksheets so, at the begining I have 1 excel file with one Worksheet inside another excel file with one Worksheet inside another excel file with one Worksheet inside
4
3717
by: Leeor Chernov | last post by:
Hi , I Used the object Excell Application(COM INTEROP) and it is staying as an open process, And the owner(User Name) is ASPNET Altough I try to release it with : System.Runtime.InteropServices.Marshal.ReleaseComObject, And GC.Collect. Every time I am opening a new Excel.Application() , I get more Processes in memory. Note: I am calling the CreateExcellObj each time I am pressing a button from my web page The release Methods sometimes...
2
2035
seshu
by: seshu | last post by:
hi every body This is seshu i have doubt in mysql i have some date in excell sheet to export that data i have copied all the data into a text file and the wrote this code in mysql editor LOAD DATA LOCAL INFILE 'pet.txt' INTO TABLE pet; it has been exported but now the problem is insted giveing my id no as id_0033 it is giving Id_0033along with a box suffixed to the id and this is only to last coumn why is it showing so...
1
2116
by: yduani | last post by:
Hi, I'm running 2 different executables: One saving infinitely an excell file, Other Read it infinitely. time duration for Save/Open is randomally. This 2 applications works fine differently, but together they cause a colligion. (Can't save file. probably while other application reading it at the same time) My questions are: 1. Do I need to protect from 2 different sources tends to same resource? (I know the keyword "semaphore" /...
2
1630
by: Twanne | last post by:
Hi, I've got these files in excell that need to be imported to access. Now I've got one file, and when I try to import it, it acts weird. There are two fields in the excell fiile (Start, Stop) that are dates. When I have done my import the dates change to some number for some reason. 19/02/2007 changes into 39132. I've got an idea why it is done (dates are stored as long in access) but I got no idea how to get around this. This only happens...
1
2282
by: thripurari | last post by:
Hi ! Dear all! I am getting a problem while binding the data source to the ultragrid . pls can any one could help me to bind the excell file to my ultra grid. My Question is: How to bind the data to the Ultragrid in windows application using C#.net, if the data source is either excell file or .XLS file? pls urgent. thanx anil kumar
1
1464
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I m creating a database. The data for database will fetched from an excell sheet. Now how can i read an excell sheet and update my database with that excell sheet. Or I want to show all records of excell sheet in a listbox having a title of speecific text like "Names". Thanx >> ALI <<
0
1355
by: chandan | last post by:
Hi, I have written an application for exporting grid data to excel using asp.net and c#.After writting the data in excel I save it in a folder inside my application.After that I invoke the file download dialog it prompt with open/save/cancel button.This dialog takes the path of saved excel file that was inside my application.When I clik on the open button It opens the two copy of same excel file? I am not able to fine why it opens two...
0
979
by: up2you | last post by:
Hi, Below there is a example code that i saved from web page source. in this site when i click "Excell'e Aktar" the excel file download page appears. What i want to do is; i want to open this link with vb6 code. Is it possible? I put the whole code to attachment. example Code from webpage: </tr><tr class="unsele" OnMouseOver="className='sele'" OnMouseOut="className='unsele'">
0
8432
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
8856
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...
0
8633
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...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
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
4179
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...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.