Displaying an Excel spreadsheet

Discussion in 'ASP .Net' started by Brooke, Feb 24, 2006.

  1. Brooke

    Brooke Guest

    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
    Brooke, Feb 24, 2006
    #1
    1. Advertising

  2. Brooke

    sloan Guest

    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.




    "Brooke" <> wrote in message
    news:...
    > 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
    >
    >
    sloan, Feb 24, 2006
    #2
    1. Advertising

  3. You could generate the Excel reports dynamically.
    Here is some guidance:
    http://SteveOrr.net/articles/ExcelExport.aspx
    http://SteveOrr.net/articles/ExportPanel.aspx
    http://SteveOrr.net/reviews/AsposeExcel.aspx
    http://SteveOrr.net/reviews/OfficeWriter.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net



    "Brooke" <> wrote in message
    news:...
    > 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
    >
    Steve C. Orr [MVP, MCSD], Feb 25, 2006
    #3
  4. 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


    "Brooke" wrote:

    > 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
    >
    >
    >
    =?Utf-8?B?RWx0b24gVw==?=, Feb 26, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. FSD
    Replies:
    0
    Views:
    1,183
  2. Tim Marsden

    Displaying an Excel spreadsheet

    Tim Marsden, Feb 20, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    2,621
    S. Justin Gengo
    Feb 20, 2004
  3. =?Utf-8?B?S2VpdGhSYWdpbkZAbmV3c2dyb3Vwcy5ub3NwYW0=

    Returning Excel Spreadsheet as web page

    =?Utf-8?B?S2VpdGhSYWdpbkZAbmV3c2dyb3Vwcy5ub3NwYW0=, Apr 23, 2004, in forum: ASP .Net
    Replies:
    10
    Views:
    2,724
    Steven Cheng[MSFT]
    May 6, 2004
  4. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,482
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  5. Horhayson

    Displaying an Excel spreadsheet in ASP page?

    Horhayson, Feb 2, 2005, in forum: ASP General
    Replies:
    3
    Views:
    136
    Tom Kaminski [MVP]
    Feb 2, 2005
Loading...

Share This Page