?
Solved

Opening and reading an Excel File From the soruce without uploading

Posted on 2009-06-30
5
Medium Priority
?
340 Views
Last Modified: 2012-05-07
Hello all
My asp.net 2.0 application  needs  to open an excel file and read the content for writing into DB.
In order to do this  ,currenty I upload document into application  server and take IIS directory reference of file and read it.
However my hosting department does not allow me saving excel  file in server,they suggest saving it on a shared file and read/write from there which is not a better option for us.
Do you know how can I   open  and read an excel file   from the soruce location without uploading ?
is there a way ?

thanks in advance for the all answers

0
Comment
Question by:hedgeselect
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:boowhup
ID: 24745085
if the share is on the same domain/network as the app server then just change the location from

(c:\myfolder\myexcel.xls) to (\\otherserver\sharedfolder\myexcel.xls) in your connection string.

You could do some checks before you create the connection ....

IF Exists "otherserver\sharedfolder\myexcel.xls" then
   db.execute
end if

etc etc
0
 

Author Comment

by:hedgeselect
ID: 24746860
This is ok  ,
but as I emphasize in my question I need to read directly from the source rather than puting file in shared area .is it doable ?
0
 
LVL 5

Expert Comment

by:boowhup
ID: 24746879
make the folder a share on your network perhaps?

Is there any reason the source cant be ona  network share?
0
 

Author Comment

by:hedgeselect
ID: 24747093
if I open a network share and give access to whole intranet  , can an external server  in the intranet reach and read /write to file  ?
0
 
LVL 5

Accepted Solution

by:
boowhup earned 2000 total points
ID: 24747192
Yep, if you're part of a domain you can make it read and/or write to a single user, the whole domain, security group etc etc

If you're not part of a domain you can still narrow it down to a user or users, but would have to setup the same username amd password on the server to access the file. Or just make it wide open for everyone.

This is of course talking about intranet , internet is a whole different story. Better of migrating the excel into a sql server, and using excel to interface it at your end.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question