Forum Moderators: open

Message Too Old, No Replies

Embed xls worksheet in aspx page

xls sheet with macros needs to be interactive

         

Jhet

4:51 pm on May 29, 2008 (gmt 0)

10+ Year Member



I have an excel worksheet that I need to embed into an asp.net page. The worksheet has macros inside that will need to work as well. Is there a way to do this?

If anyone could point me in the right direction I'd be grateful!

Ocean10000

3:51 am on Jun 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Some questions come to my mind while reading your post.

What does the excel spread sheet do that it is required to be embed in a webpage? Is it just data collection, number crunching, or is it for downloading?

What do the macro's do that can not be done using Asp.Net? Is this spread sheet going to be on a public site or internal?

What it comes down to is I am trying to figure out your reasons behind your request. So to see if it can be done in a different fashion that might work better for you.

Jhet

11:37 pm on Jun 1, 2008 (gmt 0)

10+ Year Member



It's going to be on an internal only site. I'm not sure what the macro's are going to be doing since I'm not the one to program them. I think they will connect to a data source and crunch some numbers based on what the user enters. Whatever the macro's do I'm sure it could probably be done in .net.

I believe that management does not want the xls file to be downloaded. They seem to want something quick and easy that will be usable on a web page.

I take it that means embeding the xls with macros would be difficult? Is there an easy way to embed the xls sheet without the macros?

Thanks for the reply!

Ocean10000

1:44 pm on Jun 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



To be honest it would be easier for you to write the code to link to the database and do the number crunching code in dot.net and display it in a simple web page with no active x related controls. This way it could be viewed with IE and Firefox and any number of different browsers.

I personally avoid embedding any active-x controls period in any web page, never know when the next active-x gotcha is going to roll down the pipe from Microsoft.

Jhet

4:12 pm on Jun 2, 2008 (gmt 0)

10+ Year Member



I have gotten more information on this project and it looks like this excel sheet is going to be pretty complicated. More complicated than I'd like to try duplicating with .net code in a week.

So my question now is, how difficult would it be to connect to the xls file, put numbers in, grab the changed graphs/numbers and display them on a .net page?

aspdaddy

8:40 pm on Jun 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Its possible to open excel docs and run VBA macros using client javascript but it only really works if the docs are accessible to the clients and you can advise security settngs -like on an extranet setup.

Why not just re-write using OWC.Chart or some .NET component ?

Jhet

9:15 pm on Jun 2, 2008 (gmt 0)

10+ Year Member



The charts don't seem to be static charts. They look like glasses of water. The 'water' increases and decreases based on a slider and some formula.

I'll check out OWC.Chart and see if they will work for me, thanks.

What are you thoughts on opening the xls with oledb, changing the numbers and then showing the image on the page?