473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Launch excel from web page

anybody know how to launch desktop excel from a webpage and feed it either a
dataset or a file? i've got MS sample code but it aint compiling with the
office 10 library. i wonder if they changed the libraries cuz i used object
browser and the interface they are calling doesn't exist in the class. I'm
not looking for an OWC solution either
Nov 15 '05 #1
2 6357
Hi Alvin,

Just import the Excel type library with tlbimp, or reference it as a COM
library from VS .NET and the interop assembly will be created behind the
scenes. Then, follow the example just to figure out which objects and
collections are used and how. Office should be also supplied with a CHM file
somewhere in the "1033" sub-folder documenting the object model and its
usage from VBA. The object model is still the same with .NET so all this
knowledge applies.

The only thing you should definitely bear in mind is that you might have
insufficient permissions to run Excel from a Web application. Specific cases
may vary, the simplest solution would be to grant necessary permissions as
described in the "ASP .NET Code Access Security" MSDN topic.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:uO**************@tk2msftngp13.phx.gbl...
anybody know how to launch desktop excel from a webpage and feed it either a dataset or a file? i've got MS sample code but it aint compiling with the
office 10 library. i wonder if they changed the libraries cuz i used object browser and the interface they are calling doesn't exist in the class. I'm
not looking for an OWC solution either


Nov 15 '05 #2
oh well, time was an issue so i just used the embed object.
thanks
"Drebin" <tR*************@hotmail.com> wrote in message
news:nq*****************@newssvr16.news.prodigy.co m...
Office would need to be installed on the server where you are using this
code (ie. the server).

This all seems very overkill. With Office97 and later, you can either create a csv file, or an html table - and set the content type to be
"application/vnd.excel" or whatever it is.. and excel will just open.. In
other words, in Notepad - past this:

<table>
<tr>
<td><b><i>some data</i></b></td>
</tr>
</table>

and save this as "C:\Test.xls" - this file will open in Excel 97 and greater as a real Excel file..

In Office2000.. you can return a pretty complex xml doc that has every tiny little setting in Excel - and you can return multi-tab workbook...
"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
I'll be a little more specific.

http://support.microsoft.com/default...b;EN-US;302084
This does not compile. Reason(s).
There is no Microsoft Excel library COM object on my computer. The closest
I
can find is Microsoft Excel 10 Object library. Using this library,

Compiler error with this line
using Excel = Microsoft.Office.Interop.Excel;

Excel is already defined. Change it to this

using Excel2 = Microsoft.Office.Interop.Excel;

Office does not exist in the class or namespace microsoft. I can't go any further. Does this compile on your computer?

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote in message news:#q**************@TK2MSFTNGP10.phx.gbl...
Hi Alvin,

Just import the Excel type library with tlbimp, or reference it as a COM library from VS .NET and the interop assembly will be created behind the scenes. Then, follow the example just to figure out which objects and
collections are used and how. Office should be also supplied with a CHM
file
somewhere in the "1033" sub-folder documenting the object model and
its usage from VBA. The object model is still the same with .NET so all this knowledge applies.

The only thing you should definitely bear in mind is that you might have insufficient permissions to run Excel from a Web application. Specific cases
may vary, the simplest solution would be to grant necessary

permissions as described in the "ASP .NET Code Access Security" MSDN topic.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in message news:uO**************@tk2msftngp13.phx.gbl...
> anybody know how to launch desktop excel from a webpage and feed it

either
a
> dataset or a file? i've got MS sample code but it aint compiling

with the
> office 10 library. i wonder if they changed the libraries cuz i used
object
> browser and the interface they are calling doesn't exist in the
class. I'm
> not looking for an OWC solution either
>
>



Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: SK | last post by:
I am calling an exe thru' href, but when it executes, I get the message if I want to open the file(exe file). Is there any way I can suppress this from appearing and open the program? Thank...
7
by: JIM.H. | last post by:
Hello, How can I launch excel in my asp.net application? Thanks, Jim.
4
by: Caroline | last post by:
I'd like to launch an executable file from a web page. Basically, the user enters seven parameters and then clicks a button to generate a graph. The input is written to a file and then read by...
1
by: Jacob | last post by:
I have several web apps that I want to redirect to a new page, but have that page open in a new browser window. The basic scenario is that I have a CrystalReport object that gets created and...
2
by: Peter Ignarson | last post by:
Hi there - I am writing a paint program (I am following a learning tutorial, there is no point to writing a paint program) and I want to extend it so that I can copy the contents of my drawing and...
0
by: Tuong Do | last post by:
I have an excel or PDF file in memory stream that was was exported from Crystal Report. How do I launch this file? Launch a file from disk can be done by using process.start() But it has...
3
by: Mat | last post by:
Is it possible to launch a local application from an HTML or ASP.NET page?
2
by: dvananne | last post by:
Running NT and 2003. Tried to install Essbase add-in. Excel now takes 60+ seconds to open. Any ideas? Seems like it is looking for a file to launch and either finds it or does not... Help!
1
by: Cristina | last post by:
Hi, i'm trying to launch excel from an asp.net application. My problem is that i already install excel 2003 on the server but i dont find excel on the list of dcom applications; do i need to do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.