Smart solution!
Could you post an example, especially of the call to the shellexecute?

Rafael


----- Original Message ----- 
From: "MB Software Solutions,LLC" 
<mbsoftwaresoluti...@mbsoftwaresolutions.com>
To: <profoxt...@leafe.com>
Sent: Friday, September 11, 2009 11:58 AM
Subject: Re: vfp and OpenOffice automation


> Rafael Copquin wrote:
>> I need to do the following:
>>
>> create a cursor from a select statement
>> instantiate an OpenOffice scal object  (this would be equivalent to 
>> instantiate an Excel object)
>> send all data from the cursor to the OO object
>> show the resulting sheet to the user
>>
>> Now, I have seen a few examples by googling, but they are very 
>> complicated.
>>
>> What I have found so far does the following:
>>
>> instantiates the OO object
>> opens a blank sheet
>> and by a series of commands, sends data to the sheet.
>>
>> something like this:
>>
>> oSheet,getCellByPosition(0,1).setstring("January")
>>
>> etc
>>
>> oSheet,getCellByPosition(1,1).setvalue(1,234.56)
>>
>> etc
>>
>> This is cumbersome and time consuming.
>>
>> I would like to do this
>>
>> create the VFP cursor from the select statement
>> save it to disk thus:
>>
>> copy to fileondisk type xl5
>>
>> instantiate a OO object
>> make the object open the fileondisk.xls
>> show it to the user.
>>
>> Any examples of code that you guys would furnish?
>>
>> TIA
>>
>> Rafael Copquin
>
>
> Hi Rafael,
>
> I've created output with the COPY TO MyFile TYPE XL5 and then simply did
> a ShellExecute on that file and because OpenOffice was my office
> program, it automatically opened it up for me.  Couldn't be any easier
> than that for what you're asking...unless OO isn't the default
> application handler for a filetype of XLS.
>
>
> -- 
> Mike Babcock, MCP
> MB Software Solutions, LLC
> President, Chief Software Architect
> http://mbsoftwaresolutions.com
> http://fabmate.com
> http://twitter.com/mbabcock16
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/30d5752b6e1f4a08a5e2cddf0e48b...@rafanueva
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to