Google Answers Logo
View Question
 
Q: Query Excel Data hosted on Website using ASP.NET ( No Answer,   9 Comments )
Question  
Subject: Query Excel Data hosted on Website using ASP.NET
Category: Computers > Programming
Asked by: hailstorm-ga
List Price: $12.00
Posted: 26 Feb 2004 22:51 PST
Expires: 27 Mar 2004 22:51 PST
Question ID: 311311
From the following Microsoft support document:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q311731

I am able to see how you can query an Excel file through ASP.NET.  The
only problem is, this approach requires that the Excel file be
available as a locally accessable file, like C:\datafile.xls.  The
datafile I want to retrieve is on the internet, such as
http://www.dummysite.com/datafile.xls (example name only, not a real site...)

I'm able to use the WebRequest and StreamReader to read the Excel file
as a binary stream, but then I have to save this somewhere locally and
open the saved file.  I want to be able to read the file and directly
be able to use that file as my data source to query without writing
anything to the local server.  Could you show me how this can be done
using VB.NET?
Answer  
There is no answer at this time.

Comments  
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: cheater512-ga on 28 Feb 2004 00:50 PST
 
Your looking at it the wrong way.
There are database drivers which allow you to open a Excal (or csv for
that matter) file as a database.
Search around for the correct connection string. It will have excel in it.
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: hailstorm-ga on 28 Feb 2004 06:09 PST
 
I know this.  The problem is that you have to access a local file, and
not a file on the internet.
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: mohamad83-ga on 08 Mar 2004 13:35 PST
 
Try writing the full URL of the online Excel file in the
Server.MapPath() inside the connection string
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: hailstorm-ga on 09 Mar 2004 00:11 PST
 
Would that such a simple, elegant solution would work...but alas, it does not.
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: dotnetfriends-ga on 10 Mar 2004 06:00 PST
 
You mean, there should be user web userinterface to load excel file
and then pull data from the loaded excel at run time. am i correct?
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: hailstorm-ga on 10 Mar 2004 22:39 PST
 
Exactly.
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: sergeychernyshev-ga on 12 Mar 2004 12:55 PST
 
You can't use Excel file located on remote HTTP server as datasource
because HTTP knows nothing about file's format - it treats all files
equally and can only give you it's MIME type in "Content-type" header.

You have two options:
1. Download Excel file to temporary folder, read it as database and
delete it afterwards.

2. IF you have ability to put scripts to remote server, then implement
reading functionality on that remote server and send DB requests to
remote server through CGI-protocol getting results in response body
(as XML for example). This can be done as web service or as simple web
page.

    Sergey.
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: hailstorm-ga on 12 Mar 2004 16:09 PST
 
That's what I know as of now, and due to project requirements and
security restrictions I'm not happy with either option.  I was hoping
there was a way to read the file into memory and treat that memory as
if you were using a file somehow.  Basically the same as creating and
deleting a temporary file, except without actually creating the
temporary file.
Subject: Re: Query Excel Data hosted on Website using ASP.NET
From: mathtalk-ga on 15 Mar 2004 11:31 PST
 
Hi, hailstorm-ga:

Have you considered using a small RAM disk for this purpose?

regards, mathtalk-ga

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy