Hi, no one answered so I thought reposting would get this some attention...
What is the best way to manipulate MSOffice programs? I understand that
regular web pages do not have certain permissions (because of safety
measures) to do things like open up MS word/excel programs, for example, from
a web site. Usually an activex control must be installed first I think?
What I need is a strategy for the best way to open up word/excel
applications and manipulate them by adding/removing text, formatting, and
doing mail merge types of transactions. Would ActiveX be the best strategy
to accomplish this from a web page?
I am NOT trying to make a desktop application to manipulate MSOffice only
because people want to be able to use this program from remote locations. I
have also taken a look at smart clients but I am not sure how difficult it is
to code them or if it is even a good idea?
Any thoughts or comments are welcome. Thanks in advance. 5 1614
You can programmatically manipulate Office documents on a web server,
but you will need to configure the code, web application, or the COM
object to run as a specific user that has the necessary permissions to
work with the documents.
If you want to manipulate Office documents on a server for a client,
then the best way is to use the Office Primary Interop Assemblies
(PIA), which can be downloaded from Microsoft. The PIA allows you to
interface with the Office COM objects, exposing the objects, methods,
and properties that will allow you to do just about anything to the
documents. Though, the PIA only exists for Office XP and 2003.
However, a cautious warning: Office was not intended to be automated
without an acutal user. Therefore, potential problems could occur
doing automation that will cause the process to hang. For instance, if
you are automating an Excel spreadsheet that generates some type of
prompting error during your manipulation, then the process will hang
because it is waiting for a user response that can never be given.
Thanks for replying.
The word/excel document templates will be loaded from the server on the
network and manipulated on the client machine. Any client machine on the
network should/will have permissions to access these documents. Howeve, I
thought that ASP.NET for example, was not allowed to load up Word/Excel using
the 'Set appWord = CreateObject("Word.Application")' command because of
security reasons. Guess I was wrong and it can in fact be done? I will take
a deeper look into this...
Any knowledge of Smart Client? I guess a Smart Client ISN'T the way to go
after all...I'm still a little unclear as to if using them would be a good
idea? It's just that my company currently uses a desktop interface on the
network and I thought that coding a Smart Client would give them the
familiarity of a desktop interface witih the ability to talk over the
internet/network w/ web services whenever needed. Then again, it may just be
a whole lot more work of code (creating XML web services and logic handlers
for Smart Clients) that do not need to be done. Do you have any knowledge of
Smart Client? If not, it's ok I will continue to look into your response.
Thanks again.
"Boyd Ferris" wrote: You can programmatically manipulate Office documents on a web server, but you will need to configure the code, web application, or the COM object to run as a specific user that has the necessary permissions to work with the documents.
If you want to manipulate Office documents on a server for a client, then the best way is to use the Office Primary Interop Assemblies (PIA), which can be downloaded from Microsoft. The PIA allows you to interface with the Office COM objects, exposing the objects, methods, and properties that will allow you to do just about anything to the documents. Though, the PIA only exists for Office XP and 2003. However, a cautious warning: Office was not intended to be automated without an acutal user. Therefore, potential problems could occur doing automation that will cause the process to hang. For instance, if you are automating an Excel spreadsheet that generates some type of prompting error during your manipulation, then the process will hang because it is waiting for a user response that can never be given.
Here are a few comments that may help you with your design or point you
in a better direction:
In a closed environment where everyone is using Windows and has the
..NET Framework, then a smart client is almost always a better solution
than a web page. Web pages are only good for two things: displaying
read-only information or providing an interface that can be usable
across multiple operating systems. If you have a Microsoft
environment, then use a smart client using no-touch deployment (NTD).
NDT may be called by other names, but searching for "no touch
deployment" or "NTD" will give you information about this type of
deployment. NTD will allow you to distribute a Windows Forms
application like a web page; someone would simply type the URL or click
on a web page link to access the application. (You may need to adjust
the client's .Net Security settings to allow the application to
execute.)
If you are going to manipulate the Office document on the client and
want to use web pages, then you could perform this task on the client
using JavaScript. The security policy on the client would need to
allow the creation of ActiveX controls via JavaScript, using the
ActiveXObject. For the Office document's location, you would use the
web path, such as http://MyWebServer/MyDocument.doc. Here is a link
for the description on the JScript object: http://msdn.microsoft.com/library/de...iveXObject.asp
I do not know the type of application you are building, so a web
application may be the best solution. However, you may want to
consider Windows Forms instead of web pages: create a windows
application, deploying it via the web using NDT. However, the client
machines will need to have the Office PIA installed and may need their
security settings adjusted. Though, if you still want to use web
forms, then you could use a .NET assembly embedded on the web page
using the <object> tag, using JavaScript to access the .NET Object.
Catch you later,
Boyd
Here are a few comments that may help you with your design or point you
in a better direction:
In a closed environment where everyone is using Windows and has the
..NET Framework, then a smart client is almost always a better solution
than a web page. Web pages are only good for two things: displaying
read-only information or providing an interface that can be usable
across multiple operating systems. If you have a Microsoft
environment, then use a smart client using no-touch deployment (NTD).
NDT may be called by other names, but searching for "no touch
deployment" or "NTD" will give you information about this type of
deployment. NTD will allow you to distribute a Windows Forms
application like a web page; someone would simply type the URL or click
on a web page link to access the application. (You may need to adjust
the client's .Net Security settings to allow the application to
execute.)
If you are going to manipulate the Office document on the client and
want to use web pages, then you could perform this task on the client
using JavaScript. The security policy on the client would need to
allow the creation of ActiveX controls via JavaScript, using the
ActiveXObject. For the Office document's location, you would use the
web path, such as http://MyWebServer/MyDocument.doc. Here is a link
for the description on the JScript object: http://msdn.microsoft.com/library/de...iveXObject.asp
I do not know the type of application you are building, so a web
application may be the best solution. However, you may want to
consider Windows Forms instead of web pages: create a windows
application, deploying it via the web using NDT. However, the client
machines will need to have the Office PIA installed and may need their
security settings adjusted. Though, if you still want to use web
forms, then you could use a .NET assembly embedded on the web page
using the <object> tag, using JavaScript to access the .NET Object.
Catch you later,
Boyd
Thank you very much!
"Boyd Ferris" wrote: Here are a few comments that may help you with your design or point you in a better direction:
In a closed environment where everyone is using Windows and has the ..NET Framework, then a smart client is almost always a better solution than a web page. Web pages are only good for two things: displaying read-only information or providing an interface that can be usable across multiple operating systems. If you have a Microsoft environment, then use a smart client using no-touch deployment (NTD). NDT may be called by other names, but searching for "no touch deployment" or "NTD" will give you information about this type of deployment. NTD will allow you to distribute a Windows Forms application like a web page; someone would simply type the URL or click on a web page link to access the application. (You may need to adjust the client's .Net Security settings to allow the application to execute.)
If you are going to manipulate the Office document on the client and want to use web pages, then you could perform this task on the client using JavaScript. The security policy on the client would need to allow the creation of ActiveX controls via JavaScript, using the ActiveXObject. For the Office document's location, you would use the web path, such as http://MyWebServer/MyDocument.doc. Here is a link for the description on the JScript object:
http://msdn.microsoft.com/library/de...iveXObject.asp
I do not know the type of application you are building, so a web application may be the best solution. However, you may want to consider Windows Forms instead of web pages: create a windows application, deploying it via the web using NDT. However, the client machines will need to have the Office PIA installed and may need their security settings adjusted. Though, if you still want to use web forms, then you could use a .NET assembly embedded on the web page using the <object> tag, using JavaScript to access the .NET Object.
Catch you later,
Boyd
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Joe |
last post by:
Please repost answer message did not make it last time
Hello,
Joe here, wanted to get the 411 on this article. I posted
in the FrontPage forum but there is never an answer. So I
have come...
|
by: Mike Lundell |
last post by:
lemee try this again, for today's date :)...
..............
what's wrong with this, and .. can you not declare "char" variables?
#include <iostream>
int main()
{
|
by: Ohaya |
last post by:
Hi,
We've been having a problem with one particular page that has a button
on it, and a "tall" image (top-to-bottom).
The button calls some simple Javascript to print the frame in which the...
|
by: Fresh Air Rider |
last post by:
Hi Everyone
Scenario
A Webage has two dropdown lists, one for Suppliers and one for
Products.
When a user selects a supplier, it then populates the Products
dropdown list with the relevant...
|
by: rawCoder |
last post by:
Hi All,
This is a repost of 'Disable DataGrid AutoScroll of 3/7/2005'
Its related to "WinForm DataGrid"
HOW can i force the grid NOT to Auto Scroll to the ( newly added item OR
last...
|
by: Adam |
last post by:
I've posted about this previously, but failed to receive
a satisfactory response, so have included a code sample:
I am trying to receive messages from an HTML viewer
control in compact.net (c#),...
|
by: Steve McLellan |
last post by:
Hi,
Sorry to repost, but this is becoming aggravating, and causing me a lot of
wasted time. I've got a reasonably large mixed C++ project, and after a
number of builds (but not a constant...
|
by: Adrian Parker |
last post by:
I've got the standard SqlCacheDependency working just fine , ie. I've
defined (and encrypted) the connectionStrings section in the web.config, and
I've also defined an an sqlCacheDependency in the...
|
by: Gerry |
last post by:
I have a combo box and I can populate it with my class of dat
(the class allows me to store each userid,username called - see code below
I want the user to select the dropdown and see the...
|
by: Raj |
last post by:
Hi,
I have the following problem. I am displaying and printing a PDF file
that is generated by my Application server. The print dialogs comes up
correctly for the small PDF for the larger PDFs...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
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...
| |