By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,080 Members | 1,855 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,080 IT Pros & Developers. It's quick & easy.

Run Excel Template

P: n/a
VS2008 ans ASP.NET 3.5, Office 2003

What is the best way to run Excel Template from ASP.NET web page were the
Excel is only installed on the client without any ActiveX? If so can someone
point me to an example? Do not have Sharepoint.

This is for Intranet and security is not important.
Thank You
Peter

Sep 7 '08 #1
Share this Question
Share on Google+
13 Replies


P: n/a
"Peter" <cz****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
VS2008 ans ASP.NET 3.5, Office 2003

What is the best way to run Excel Template from ASP.NET web page were the
Excel is only installed on the client without any ActiveX? If so can
someone point me to an example? Do not have Sharepoint.

This is for Intranet and security is not important.
What precisely do you mean by "run Excel Template"...?

What are you trying to run and where are you trying to run it?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #2

P: n/a
From a web page I want to open an Excel Template from a shared drive and
populated it with data in cluding pictures?

Is using Java Script the best way to accomplish this?
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:OW**************@TK2MSFTNGP06.phx.gbl...
"Peter" <cz****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>VS2008 ans ASP.NET 3.5, Office 2003

What is the best way to run Excel Template from ASP.NET web page were the
Excel is only installed on the client without any ActiveX? If so can
someone point me to an example? Do not have Sharepoint.

This is for Intranet and security is not important.

What precisely do you mean by "run Excel Template"...?

What are you trying to run and where are you trying to run it?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #3

P: n/a
"Peter" <cz****@nospam.nospamwrote in message
news:uW**************@TK2MSFTNGP03.phx.gbl...

[top-posting corrected]
>What precisely do you mean by "run Excel Template"...?

What are you trying to run and where are you trying to run it?

From a web page I want to open an Excel Template from a shared drive and
populated it with data in cluding pictures?

Is using Java Script the best way to accomplish this?
Not so long as you're doing this from ASP.NET... That would involve
server-side Office automation which is neither recommended nor supported by
Microsoft because Office is not designed to be automated in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

Presumably, if you want to open an Excel template and populate it with data,
it's because you want to create an Excel workbook. If so, then you need
this:
http://www.aspose.com/categories/fil...a/default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #4

P: n/a
If use JavaScript I can't do Client Side automation?
Can't I open an Excel Template from a shared drive and passs the data from
JavaScript into Excel spreadsheet?

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:u5**************@TK2MSFTNGP04.phx.gbl...
"Peter" <cz****@nospam.nospamwrote in message
news:uW**************@TK2MSFTNGP03.phx.gbl...

[top-posting corrected]
>>What precisely do you mean by "run Excel Template"...?

What are you trying to run and where are you trying to run it?

From a web page I want to open an Excel Template from a shared drive and
populated it with data in cluding pictures?

Is using Java Script the best way to accomplish this?

Not so long as you're doing this from ASP.NET... That would involve
server-side Office automation which is neither recommended nor supported
by Microsoft because Office is not designed to be automated in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

Presumably, if you want to open an Excel template and populate it with
data, it's because you want to create an Excel workbook. If so, then you
need this:
http://www.aspose.com/categories/fil...a/default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #5

P: n/a
"Peter" <cz****@nospam.nospamwrote in message
news:Oq**************@TK2MSFTNGP03.phx.gbl...

[please don't top-post]
>[top-posting corrected]
>>>What precisely do you mean by "run Excel Template"...?

What are you trying to run and where are you trying to run it?

From a web page I want to open an Excel Template from a shared drive and
populated it with data in cluding pictures?

Is using Java Script the best way to accomplish this?

Not so long as you're doing this from ASP.NET... That would involve
server-side Office automation which is neither recommended nor supported
by Microsoft because Office is not designed to be automated in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

Presumably, if you want to open an Excel template and populate it with
data, it's because you want to create an Excel workbook. If so, then you
need this:
http://www.aspose.com/categories/fil...a/default.aspx

If use JavaScript I can't do Client Side automation?
Not natively in a browser...
Can't I open an Excel Template from a shared drive and pass the data from
JavaScript into Excel spreadsheet?
Not without using ActiveX and seriously ramping down your security
settings...

The sticking point here is the browser. All modern browsers are designed
specifically to prevent any sort of direct interaction with the client
hardware and software.

What are you *precisely* trying to do?

As I said, presumably you're trying to create an Excel workbook based on a
template. What happens to this newly created workbook?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #6

P: n/a
I am trying to create a report from Excel Template.
Once the Excel spreadsheet is created it will be displayed in Excel and the
used will be able to do what ever they want with it.
But I guess that's not possible without ActiveX or 3rd party software or
lowering your security.
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:O4****************@TK2MSFTNGP03.phx.gbl...
"Peter" <cz****@nospam.nospamwrote in message
news:Oq**************@TK2MSFTNGP03.phx.gbl...

[please don't top-post]
>>[top-posting corrected]

What precisely do you mean by "run Excel Template"...?
>
What are you trying to run and where are you trying to run it?

From a web page I want to open an Excel Template from a shared drive
and populated it with data in cluding pictures?

Is using Java Script the best way to accomplish this?

Not so long as you're doing this from ASP.NET... That would involve
server-side Office automation which is neither recommended nor supported
by Microsoft because Office is not designed to be automated in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

Presumably, if you want to open an Excel template and populate it with
data, it's because you want to create an Excel workbook. If so, then you
need this:
http://www.aspose.com/categories/fil...a/default.aspx

If use JavaScript I can't do Client Side automation?

Not natively in a browser...
>Can't I open an Excel Template from a shared drive and pass the data from
JavaScript into Excel spreadsheet?

Not without using ActiveX and seriously ramping down your security
settings...

The sticking point here is the browser. All modern browsers are designed
specifically to prevent any sort of direct interaction with the client
hardware and software.

What are you *precisely* trying to do?

As I said, presumably you're trying to create an Excel workbook based on a
template. What happens to this newly created workbook?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #7

P: n/a
Hello Peter,

A. If you expect that your clients can create an Excel workbook according
to the Excel template in their client machine by clicking on a button in
the web page, the following two solutions may help you:

Solution 1. have a link to the template file in your web page.
When you clients click on the link, a "File download" dialog appears. If
the client click on "Open", an excel workbook will be created according to
the template, and be opened in the web browser (if the client is using
Office 2003), or in Excel (if the client is using Office 2007). If the
client click on "Save", he/she can save the template to his local directory.

The weakness of this solution: there is an unavoidable "File download"
dialog.

Solution 2. Write Office automation code in the client script, to automate
the client Office app to create and open a workbook according to the Excel
template.

Sample vbscript:
Dim app
set app = CreateObject("Excel.Application")
app.Workbooks.Open("URL TO THE .xlt FILE IN THE SHARED FOLDER")
app.Visible = True

The weakness of this solution: though this solution avoids the "File
download" dialog, it requires a setting in the client's IE:
"Initialize and script ActiveX control not marked as safe"
Otherwise, the script fails for sake of security.

B. If you expect to populate the Excel Template to a web page, you would
need to use Office automation on the server side. For instance, in asp.net
code, we automate Excel in the server to create a workbook based on the
template, save it as html, and embed the html content to our web page.
However, as Mark Rae said, Office automation in server app like ASP.NET is
NOT recommended. Microsoft does not support this scenario.

Regards,
Jialiang Ge (ji****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 8 '08 #8

P: n/a
""Jialiang Ge [MSFT]"" <ji****@online.microsoft.comwrote in message
news:g2**************@TK2MSFTNGHUB02.phx.gbl...
However, as Mark Rae said, Office automation in server app like ASP.NET is
NOT recommended. Microsoft does not support this scenario.
Therefore, as an employee of Microsoft, you should *NOT* be even suggesting
it...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #9

P: n/a
"Peter" <cz****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...

[please don't top-post]
>[please don't top-post]
>>>[top-posting corrected]
What are you *precisely* trying to do?

I am trying to create a report from Excel Template.
Once the Excel spreadsheet is created it will be displayed in Excel and
the used will be able to do what ever they want with it.
But I guess that's not possible without ActiveX or 3rd party software or
lowering your security.
I've already told you how to do this:
http://www.aspose.com/categories/fil...a/default.aspx

This will allow you to open the Excel template server-side *WITHOUT* the
need for server-side Office automation, and then will allow you to create a
new Excel workbook from the template. Then all you would need to do is save
it somewhere in your app's virtual directory and create a hyperlink for the
user to click...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #10

P: n/a
Thanks for pointing it out, Mark. :-)

Regards,
Jialiang Ge (ji****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Sep 8 '08 #11

P: n/a
Right!
Don't tell anyone
Security by obscurity - That's Microsoft's way.

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
""Jialiang Ge [MSFT]"" <ji****@online.microsoft.comwrote in message
news:g2**************@TK2MSFTNGHUB02.phx.gbl...
>However, as Mark Rae said, Office automation in server app like ASP.NET
is
NOT recommended. Microsoft does not support this scenario.

Therefore, as an employee of Microsoft, you should *NOT* be even
suggesting it...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #12

P: n/a
"Peter" <cz****@nospam.nospamwrote in message
news:uY**************@TK2MSFTNGP03.phx.gbl...

[top-posting corrected]
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>""Jialiang Ge [MSFT]"" <ji****@online.microsoft.comwrote in message
news:g2**************@TK2MSFTNGHUB02.phx.gbl...
>>However, as Mark Rae said, Office automation in server app like ASP.NET
is
NOT recommended. Microsoft does not support this scenario.

Therefore, as an employee of Microsoft, you should *NOT* be even
suggesting it...

Right!
Don't tell anyone
Don't tell people to use a technology in a way for which it was not designed
at all, and which more often than not results in a web server crash leading
to loss of data...?

Yeah, I would say so...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #13

P: n/a
Right, don't tell people what are the options and consiquences, they will
never to that if we don't tell them.

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:ua*************@TK2MSFTNGP06.phx.gbl...
"Peter" <cz****@nospam.nospamwrote in message
news:uY**************@TK2MSFTNGP03.phx.gbl...

[top-posting corrected]
>"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>""Jialiang Ge [MSFT]"" <ji****@online.microsoft.comwrote in message
news:g2**************@TK2MSFTNGHUB02.phx.gbl.. .

However, as Mark Rae said, Office automation in server app like ASP.NET
is
NOT recommended. Microsoft does not support this scenario.

Therefore, as an employee of Microsoft, you should *NOT* be even
suggesting it...

Right!
Don't tell anyone

Don't tell people to use a technology in a way for which it was not
designed at all, and which more often than not results in a web server
crash leading to loss of data...?

Yeah, I would say so...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 8 '08 #14

This discussion thread is closed

Replies have been disabled for this discussion.