Launch excel from web page

  • Thread starter Thread starter Alvin Bruney
  • Start date Start date
A

Alvin Bruney

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
 
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.
 
oh well, time was an issue so i just used the embed object.
thanks
Drebin said:
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 said:
I'll be a little more specific.

http://support.microsoft.com/default.aspx?scid=kb;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?

in message news:#[email protected]... CHM
file
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

message 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
 
Back
Top