Solved

Opening and reading an Excel File From the soruce without uploading

Posted on 2009-06-30
5
337 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 500 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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

717 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