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

How can I send 'Save' message to the excel main window?

Hi,

I'm developing windows application using VB.Net 2005.
I would like to send 'save' message using 'SendMessage' API to the excel
appication. I've already got a handle of the excel window with 'FindWindow'
API.
How can I send 'save' command to external excel window?

Actual thing I want to do is I can handle excel application in the winform.
My client hope that all staff can use excel application in new window
application.
So, I placed excel application to the panel control on the winform using
'SetParent' API.
But I've found that excel application's main window handle is changed after
placing in the winform. So, I couldn't do anything with original excel main
window handle.

Finally, I'm trying to find another way.
First way is that user click 'open' button on the window application to open
an excel file in the network folder, and start excel application, and user
update excel file on the external excel application, and then click 'save'
button on the window application to save external excel file, and click
'close' button on the window application to close external excel application.

So, I need to use 'SendMessage' API to save and close excel application.
How can I do?

Second way is using 'Process' namespace.
However, to use 'Process' I have to study more and more.
Can you help me?

Thank you for your time.

Nov 27 '06 #1
2 2773
It isn't an answer to your question, but please have a look at VSTO:
http://msdn2.microsoft.com/en-us/lib...6d(VS.80).aspx
As Excel is an Office product, you might want to use it...

iloveprincess schreef:
Hi,

I'm developing windows application using VB.Net 2005.
I would like to send 'save' message using 'SendMessage' API to the excel
appication. I've already got a handle of the excel window with 'FindWindow'
API.
How can I send 'save' command to external excel window?

Actual thing I want to do is I can handle excel application in the winform.
My client hope that all staff can use excel application in new window
application.
So, I placed excel application to the panel control on the winform using
'SetParent' API.
But I've found that excel application's main window handle is changed after
placing in the winform. So, I couldn't do anything with original excel main
window handle.

Finally, I'm trying to find another way.
First way is that user click 'open' button on the window application to open
an excel file in the network folder, and start excel application, and user
update excel file on the external excel application, and then click 'save'
button on the window application to save external excel file, and click
'close' button on the window application to close external excel application.

So, I need to use 'SendMessage' API to save and close excel application.
How can I do?

Second way is using 'Process' namespace.
However, to use 'Process' I have to study more and more.
Can you help me?

Thank you for your time.
Nov 27 '06 #2
Thank you for your reply.

I really appreciate.

"Michel van den Berg" wrote:
It isn't an answer to your question, but please have a look at VSTO:
http://msdn2.microsoft.com/en-us/lib...6d(VS.80).aspx
As Excel is an Office product, you might want to use it...

iloveprincess schreef:
Hi,

I'm developing windows application using VB.Net 2005.
I would like to send 'save' message using 'SendMessage' API to the excel
appication. I've already got a handle of the excel window with 'FindWindow'
API.
How can I send 'save' command to external excel window?

Actual thing I want to do is I can handle excel application in the winform.
My client hope that all staff can use excel application in new window
application.
So, I placed excel application to the panel control on the winform using
'SetParent' API.
But I've found that excel application's main window handle is changed after
placing in the winform. So, I couldn't do anything with original excel main
window handle.

Finally, I'm trying to find another way.
First way is that user click 'open' button on the window application to open
an excel file in the network folder, and start excel application, and user
update excel file on the external excel application, and then click 'save'
button on the window application to save external excel file, and click
'close' button on the window application to close external excel application.

So, I need to use 'SendMessage' API to save and close excel application.
How can I do?

Second way is using 'Process' namespace.
However, to use 'Process' I have to study more and more.
Can you help me?

Thank you for your time.

Nov 27 '06 #3

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

Similar topics

0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
1
by: mabond | last post by:
Firstly I hope I'm in the right forum ..... if not can someone re-direct me please. I have an application with a main form properties set to mdiparent = true. Toolbar button allows user to open...
5
by: Carl | last post by:
Please can anyone tell me how I can create a macro to save the results of a query as an excel file? The query is called Student List and I would like to save it to "My Documents". We have had...
2
by: Steve Bishop | last post by:
I have an application that sends a query by e-mail in Excel format using a DoCmd.SendObject statement in VBA. I need to delete the column headings now before I send it. Help appreciated. Thanks....
4
by: John | last post by:
Hi, I generate a report in a comma delimited file and give it a name like MyReport.csv . I then set a Hyperlink control to point tp the file HyperLink1.text = "Download"...
12
by: Daniel Walzenbach | last post by:
Hi, I have a Website which allows users to input data. After they finished entering data they can click a button to save their input. Problem now is, that I have no possibility to visualize that...
5
by: Patrick | last post by:
Following on from the excellent example at http://www.c-sharpcorner.com/Code/2003/Sept/ExportASPNetDataGridToExcel.asp on how to save a data-grid to excel file, how can I extend the example such...
2
by: Mesan | last post by:
Hello everyone, Thanks to many useful posts in this newsgroup and others, I've been able to come very close to something I've been wanting to do for a very long time. I've figured out how to...
1
by: bamrak | last post by:
I seem to have gotten over my head, but this seems fairly straightforward.. I have a table of items assigned to a rep, and I have a rep list table created from the original table ( to show only...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.