Displaying an Excel spreadsheet

B

Brooke

I am new to ASP.NET, but have been programming for about 14 years (C#
about 2 years). My manager asked me to develop a web application that would
allow employees to view a spreadsheet that is used to manage resources
(projects, employees, hours, dates, etc). The employee should only be able
to view data that pertains to them, and not be able to modify it (read only
view). My thought is to allow my manager to upload the spreadsheet to a
location in the virtual directory, programmatically parse through the
spreadsheet and filter out the data based on the windows authentication, and
then build a html table and display the data.

Is this the correct approach? Can the spreadsheet be located in a
completely different directory that is not in the virtual directory, but
located on a server somewhere. Could I access my manager's personal
directory using his windows logon information?

The other thought is just to develop a Windows form application, but
then it would require that everyone have .NET 2.0 installed and it was tough
enough getting MIS to install the 1.1 framework.

Any help or suggestions would be greatly appreciated.

Thanks
 
S

sloan

You can use impersontation to allow
asp.net to pull resources (excel files).

I have an application.. that stores images on a fileServer. (big big
datastorage)
my web app....using impersonation.... pulls the files across the
network..copies them to a local
directory (one where IIS has access), and the aspx page gives the url to the
image...as it is now located in a IIS folder.

(I have a windows service that runs every 1/2 hour, which clears out images
that haven't been accessed in over 30 minutes).

Also check this post I made a while back:
http://groups.google.com/group/micr...read/thread/c0c2463cc359ffee/5a214c3bcca94224

(or search
http://groups.google.com/?hl=en for "xml to xml transformation" and
"spaces.msn.com"
)

I think since you have to filter....putting it into a strongly typed dataset
would be much much cleaner and easier than trying to manipulate excel data
as an OleDb datastore.

Using the trick at that other post..and my blog you could:

Convert the excel file to Xml.
Convert the xml to dataset friendly xml, using xsl.
Now that the data is in a strongly typed DataSet, you'll have a

MyStrongDS.Select("securitylevel=123 and userid=333", "dateof DESC");

...

Good luck.. if you use the xml to xml then please post a followup post.
 
G

Guest

Hi Brooke,

My suggestion is

1. Put the spreadsheet in file server. And set its access permission to
certain role(s) (by networking) so some people can modify the spreadsheet.
Actually the spreadsheet works as database. (If possible, use database rather
than excel)

2. Build a web page to show data in the ‘Database’. It’s very easy to use
GridView web control to show data (or export to spreadsheet). If it’s in
Intranet, you can use Windows authentication to get automatically login
user’s credential. Hence based on user’s role filter data. Proper
configuration setting can allow the web application to access the spreadsheet
in any place of LAN.

HTH

Elton Wang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top