HELP: how to Startup a Excel worksheet

HELP: how to Startup a Excel worksheet

Post by Oswal » Fri, 19 Mar 1999 04:00:00



Hello,

I'm a foxpro 2.6-user/programmer and I have the following problem.

A foxpro-program generates a Excel-worksheet. At the end of the program
Excel has to start with the data the program just generated.

I know I have to do this with DDE like
  mchannum  = DDEInitiate("excel", "system")
    ...
    ...
but don't know it exactly.

If MS Excel (Office97) isn't already started, Excel have to start up.
Also Excel must start up with a alternate (already designed) xlt-file, so my
output is being formatting well.

Please help me!!!

Thanks a lot....
Oswald.

 
 
 

HELP: how to Startup a Excel worksheet

Post by Wolfgang Schmal » Fri, 19 Mar 1999 04:00:00


Hello Oswald,
please refer first to the DDESetOption() in the help file.This FN determins
wether you'll be asked to start EXcel if it isn't running yet.
Further there is another possibility to start EXcel with the RUN/n EXcel.exe
mySheet. This will only work if EXcel and the Sheet are in the MSDOS Path.
In addition there is a sample in the FPW\sample\-folder.
--

mfg

Wolfgang Schmale / Germany


Quote:>Hello,

>I'm a foxpro 2.6-user/programmer and I have the following problem.

>A foxpro-program generates a Excel-worksheet. At the end of the program
>Excel has to start with the data the program just generated.

>I know I have to do this with DDE like
>  mchannum  = DDEInitiate("excel", "system")
>    ...
>    ...
>but don't know it exactly.

>If MS Excel (Office97) isn't already started, Excel have to start up.
>Also Excel must start up with a alternate (already designed) xlt-file, so
my
>output is being formatting well.

>Please help me!!!

>Thanks a lot....
>Oswald.


 
 
 

HELP: how to Startup a Excel worksheet

Post by Renato F. Ros » Fri, 19 Mar 1999 04:00:00


Hi Oswald,

If you're using Win95 or higher you could try:

run /n2 start myspreadsheet.xls

HTH,

Renato


>Hello,

>I'm a foxpro 2.6-user/programmer and I have the following problem.

>A foxpro-program generates a Excel-worksheet. At the end of the program
>Excel has to start with the data the program just generated.

>I know I have to do this with DDE like
>  mchannum  = DDEInitiate("excel", "system")
>    ...
>    ...
>but don't know it exactly.

>If MS Excel (Office97) isn't already started, Excel have to start up.
>Also Excel must start up with a alternate (already designed) xlt-file, so
my
>output is being formatting well.

>Please help me!!!

>Thanks a lot....
>Oswald.

 
 
 

1. Open Excel worksheet via OLE DB and in parallel with MS Excel

In C++ I open the

CDBPropSet      dbinit(DBPROPSET_DBINIT);
dbinit.AddProperty(DBPROP_INIT_DATASOURCE, DSN);
dbinit.AddProperty(DBPROP_INIT_LCID, (long)2055);
dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)4);
CDataSource::OpenWithServiceComponents(_T("MSDASQL.1"),&dbinit);

With these statements the worksheet is opened exclusively. If I try to
open the worksheet with MS-Excel the message appears: ...worksheet is
used by..... and can only be opened read only

Question: Does anybody know the settings for OLE DB so that there is a
shared access possible.

I appreciate every tip

Many thanks

Juergen Unger

2. PopUp.

3. Pease help me on writing records to an Excel worksheet

4. New Benchmarking Tool - Beta Users Request

5. help...inserting a two dimensional array into an Excel worksheet with vb5

6. Export to Access 97

7. HELP...inserting a 2 dimensional array into an Excel worksheet

8. Washington (DC) Area Informix User Group - September Meeting

9. HELP! Getting data to Excel Worksheet

10. Export Content of SQL-Server to Excel worksheets via using JSP

11. Trouble exporting query result to Excel worksheet using DTS

12. Trying to DROP and re CREATE a worksheet in Excel

13. How to save a Excel worksheet interactively to SQL from VBA/DTS