473,413 Members | 1,799 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,413 software developers and data experts.

Run Excel Template

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
13 2960
"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
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
"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
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
"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
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
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
""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
"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
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Axial | last post by:
Question: How to select columns from Excel-generated XML when some cells are empty. I've found examples where rows are to be selected, but I can't seem to extrapolate from that to selecting...
1
by: Steven Stewart | last post by:
I have a user who has been using Excel for a while to keep statistics and print reports. She finds using it cumbersome because of long formulas and a lot of copying and pasting. I have designed...
1
by: Bon | last post by:
Hello all I create a form with three buttons in MS Access 2000. They are Open Excel Template, Save Draft and Save Final. When I click the Open Excel Template button, the Excel template will be...
3
by: sandeshmeda | last post by:
I have a XML file that is basically a Excel file saved as XML. I need to be able to change the XML into a different format. I was thinking one approach would be to: 1. Populate the dataset...
2
by: Brent Bortnick | last post by:
Hello, Is it possible to send data from ASP and put it into a existing template? i don't want to create an excel document I only want to send one piece of information from ASP to the Exisiting...
3
by: RJN | last post by:
Hi I've a template excel file which has all the calculations defined. There are certain input values to be entered which gives a lot of output to the user. I don't want to expose the excel sheet...
1
by: Dartish | last post by:
Hi all, Thanks in advance for the help I have a DLL that which has several functions that I can call in Excel. I am thinking of how to call these functions in a .net project (authored in C#)....
10
by: Esmael | last post by:
Hi to all, /*****************************/ OS-WIn XP SP2 VB6 SP6 /*****************************/ Is their anyone who can help me with this: Source code written on VB6.
4
by: ShadowLocke | last post by:
Hi, Im not very experienced with XSL, this is my first run in with it. I found an XSL file that converts a dataset to an excel readable format. The problem I have is when the dataset has a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.