Keyboard Shortcuts
Likes
- MadFox
- Messages
Search
Excel...l
Cliff S
This code runs no problemo... Output is as expected and no errors.
*** XTest.prg *** *** finish up from madfox 17 Feb 04 meeting *** SET STEP ON oX=CREATEOBJECT("excel.application") oX.Visible=.t. oX.Workbooks.Add(1) oX.range('a1').Value=1 oX.range('b1').Value=2 oX.Range('a4').Select oX.Range('a1:b1').Copy oX.Range('a4').PasteSpecial(-4104,-4142,.f.,.t.) WAIT WINDOW 'did it work...?' oX.activeworkbook.saved=.t. oX.application.quit * Walk In Beauty, cliff |
Re: February Meeting
Stein Goering
For what it's worth...
The code below runs without error: ** CLEAR ALL *SET STEP ON *#Include excel9.h #DEFINE False .F. #DEFINE True .T. *#Include excel9.h #DEFINE False .F. #DEFINE True .T. loExcel = CREATEOBJECT("Excel.Application") loExcel.SheetsInNewWorkbook = INT(1) loWorkBook = loExcel.WorkBooks.Add loExcel.Visible = .T. loSheet = loExcel.Sheets(1) loSheet.NAME = [MadFox] loSheet.Cells(1,1).Value = [Test] loSheet.Cells(1,2).Value = 3 loSheet.Cells(2,1).Value = [Test2] loSheet.Cells(2,2).Value = 8 lcRange = [A1:B2] loSheet.Range( lcRange ).Copy lcClip = _CLIPTEXT loExcel.CutCopyMode = .F. loSheet.Range("A5").Select *SET STEP ON _CLIPTEXT = lcClip losheet.Range("a5").PasteSpecial(-4104,-4142,0,1) RELEASE ALL *** Unfortunately, it does not produce the desired result as the pasted cells are NOT transposed. It appears there is an issue with how Excel and Foxpro use the copy buffer memory, and we can avoid the PasteSpecial property error if we load the clipboard with a plain Foxpro string. (Remember during our meeting trials every once in a while we got some text to paste into the worksheet, but it always happened after we had done some copy/paste in Foxpro, thus overwriting the clipboard.) By copying the cliptext to a variable and then reading it back, I seem to have circumvented the memory space issue. However, in the process we evidently loose whatever information Excel needs to perform the transposition and we end up with an exact copy of the original range. Leaving us in a Catch-22. Maybe Jim's idea of creating and executing an Excel macro is the way to go?? On another point, you'll notice that I used the literal values rather than the include file definitions because I could not locate a copy of excel9.h I had assumed that somewhere in the MS KB it would tell me where to download it, but not so. Google turned up references to using it, but not to obtaining it. Neither could I find it in my installation of VS.Net. How the hell does one get a copy? --stein Stein Goering Arbutus Computer Services 17494 Merry Hill Rd Richland Center, WI 53581 608.538.3820 |
February Meeting
P.J. Fernandez
Talked about:
1. Wine VFP (file added to the file area) 2. Outlook Automation (How to send spam!) **** #DEFINE EmailItem 0 #DEFINE OutboxFolder 4 LOCAL oOutlook, oMessage, oAttachment, oOutboxFolder, oOutlookSpace LOCAL llHotmail, lcFileName, lcText, lnOutboxItems, lnBytes, lcTempFileName, lcTempText LOCAL lcLeadsTable, lnLatestBatch, lnRand, lcHTMLBody CLOSE DATA ALL lcTable = [RF_Announce] lnRand = INT( RAND( -1 ) ) oOutlook = CreateObject( "Outlook.Application" ) IF VARTYPE( oOutlook ) # [O] MESSAGEBOX( [Error creating Outlook object. Quitting ....] ) RELEASE oMessage, oOutlook, oAttachment, oOutlookFolder, oOutlookSpace RETURN ENDIF SET MEMOWIDTH TO 2000 IF USED( [Announce] ) USE IN Announce ENDIF USE ( lcTable ) IN 0 SHARED ALIAS Announce SELECT Announce LOCATE lcHTMLBody = FILETOSTR( [Announcement.htm] ) SCAN oMessage = oOutlook.CreateItem( EmailItem ) IF VARTYPE( oMessage ) # [O] MESSAGEBOX( [Error creating Outlook's Message object. Quitting ....] ) LOOP ENDIF oMessage.To = ALLTRIM( announce.Address ) oMessage.Subject = "Hires Marketing Executive" oMessage.HTMLBody = lcHTLMBody oMessage.SEND( ) oMessage = .F. lnRand = INT( 7 * RAND( ) ) + 1 WAIT WINDOW [Waiting some time before processing the next one....]; + ALLTRIM( announce.Address ) TIMEOUT ( lnRand ) ENDSCAN RELEASE oMessage, oOutlook, oAttachment, oOutlookFolder, oOutlookSpace ** 3. Excel Automation $#&^%#&% Frustration *&&^%*$^%R*&@@@@@ CLEAR ALL SET STEP ON #Include excel9.h #DEFINE False .F. #DEFINE True .T. loExcel = CREATEOBJECT("Excel.Application") loExcel.SheetsInNewWorkbook = INT(1) loWorkBook = loExcel.WorkBooks.Add loExcel.Visible = .T. loSheet = loExcel.Sheets(1) loSheet.NAME = [MadFox] loSheet.Cells(1,1).Value = [Test] loSheet.Cells(1,2).Value = 3 loSheet.Cells(2,1).Value = [Test2] loSheet.Cells(2,2).Value = 8 lcRange = [A1:B2] loSheet.Range( lcRange ).Copy *loExcel.CutCopyMode = .F. loSheet.Range("A5").Select SET STEP ON *loSheet.Range("A5").PasteSpecial( xlPasteAll, xlPasteSpecialOperationNone, False, True ) *loSheet.Range("A5").PasteSpecial( xlAll, xlNone, False, True) RELEASE ALL *PJ* Sub Macro1() *PJ* ' *PJ* ' Macro1 Macro *PJ* ' Macro recorded 2/17/2004 by fernanpf *PJ* ' *PJ* ' *PJ* Range("A1:B2").Select *PJ* Selection.Copy *PJ* Range("A5").Select *PJ* Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _ *PJ* , Transpose:=True *PJ* End Sub 4. TextPad editor for Java programming. 5. View Definition brings h files into view. (VFP 8.0) 6. Mover Class - see file on the website. Thanks for coming... We enjoyed the cake very much! P.J & the rest of the gang.... |
New file uploaded to madfox_vfp
Hello,
This email message is a notification to let you know that a file has been uploaded to the Files area of the madfox_vfp group. File : /Meeting Uploads/Feb04/mover.zip Uploaded by : jtllodi <jtlodi@...> Description : Mover Boxes You can access this file at the URL To learn more about file sharing for your group, please visit Regards, jtllodi <jtlodi@...> |
Re: COM and VFP6
P.J. Fernandez
Should use 7.0 or 8.0. It has better COM support.
toggle quoted message
Show quoted text
P.J.
|
Re: Attention Mr. Selje
Eric Selje
toggle quoted message
Show quoted text
|
New file uploaded to madfox_vfp
Hello,
This email message is a notification to let you know that a file has been uploaded to the Files area of the madfox_vfp group. File : /Meeting Uploads/Feb04/VFPWineHTMLs.exe Uploaded by : jtllodi <jtlodi@...> Description : Wine VFP pages You can access this file at the URL To learn more about file sharing for your group, please visit Regards, jtllodi <jtlodi@...> |
New file uploaded to madfox_vfp
Hello,
This email message is a notification to let you know that a file has been uploaded to the Files area of the madfox_vfp group. File : /Meeting Uploads/Jan04/mymenu.zip Uploaded by : jtllodi <jtlodi@...> Description : Stein's Menu You can access this file at the URL To learn more about file sharing for your group, please visit Regards, jtllodi <jtlodi@...> |
Attention Mr. Selje
P.J. Fernandez
Mr. Selje,
We are having your cake and eating it too. We are celebrating your 35th birthday with Wine, coke an a straw. Excuse while I get the dancing girls to move back behind us. They were blocking the projection screen.
Maybe you can bring up your subject next week.
Next time, Mon'
The Group
>
> From: "Stein Goering"
> Date: 2004/02/17 Tue PM 01:09:09 CST
> To:
> Subject: RE: [madfox_vfp] Meeting tonight
>
> I'm planning to ride in with Cliff. I can bring the sodas.
>
>
>
> --stein
>
>
>
> Stein Goering
>
> Arbutus Computer Services
>
> 17494 Merry Hill Rd
>
> Richland Center, WI 53581
>
>
>
> 608.538.3820
>
>
>
> _____
>
> From: PJ Fernandez [mailto:pjfern@...]
> Sent: Tuesday, February 17, 2004 10:02 AM
> To: madfox_vfp@...
> Subject: [madfox_vfp] Meeting tonight
>
>
>
> 5:30 PM - Call 239-1507 so I can open the gate.
>
>
>
> Roger is bringing cake.
>
>
>
> Jim is talking about loading Lenix.
>
>
>
> Pizza for everyone!
>
>
>
> P.J.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _____
>
> Yahoo! Groups Links
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/madfox_vfp/
>
> * To unsubscribe from this group, send an email to:
> madfox_vfp-unsubscribe@...
>
>
> * Your use of Yahoo! Groups is subject to the Yahoo!
> Terms of Service.
>
>
>
|
Re: Meeting tonight
Stein Goering
¿ªÔÆÌåÓýI¡¯m planning to ride in with Cliff.? I can bring the sodas¡ ? --stein ? Stein Goering Arbutus Computer Services 17494 Merry Hill Rd Richland Center, WI? 53581 ? 608.538.3820 ? From: PJ Fernandez
[mailto:pjfern@...]
Sent: Tuesday, February 17, 2004 10:02 AM To: madfox_vfp@... Subject: [madfox_vfp] Meeting tonight ? 5:30 PM - Call 239-1507 so I can open the gate. ? Roger is bringing cake.? ? Jim is talking about loading Lenix. ? Pizza for everyone! ? P.J.
|
Re: MadFox Meeting
hawkridge
toggle quoted message
Show quoted text
|
Re: MadFox Meeting
Jim Tooley
?
toggle quoted message
Show quoted text
I can be there tonight.
?
I have Linux running on a new box but?am still wading thru the
documents on the WINE project site. Everyone says it's pretty simple.
?
There are a couple of "gotchas" to it though and I'll try to bring the data
on that.
?
CAKE !?? Does that mean we can have Eric's cake and eat it
too?
?
Jim in Lodi
?
|
Re: MadFox Meeting
PJ Fernandez
?
toggle quoted message
Show quoted text
We have not tried in my computer because I
do not have enough space yet.? Maybe Cliff my have tried.
?
P.J.
|
Re: MadFox Meeting
Eric Selje
Cake won't be enough to entice me up. But I was thinking a good topic might be "Choices for distant data" Because of some new requirements down here I'd find it advantageous to use a database across the wire. Here are some of the options that I'm considering:
1. Different Database altogether (eg. MySQL, Informix, etc.) w/ remote views. 2. "Off-Line Views." This feature in VFP allows you to use views when disconnected, and the actual tables when connected. I haven't heard too much from people using these. 3. Some sort of hacked-together VFP as distributed database. In these scheme the business objects (which do all the data retrieval/saving) are kept on a web server and the program makes calls (ie SOAP, Web Services) to that server. 4. Others??? Eric |
Re: MadFox Meeting
Lorentzen David F.
¿ªÔÆÌåÓýI'll be there tonight, or next week, or the
week after...
?
Have we gotten VFP running on Linux
yet?
-= Dave David F. Lorentzen
|
Re: MadFox Meeting
Roger Tesch
¿ªÔÆÌåÓýI'm planning on coming. I
can bring a cake too.
?
Roger From: PJ Fernandez [mailto:pjfern@...] Sent: Monday, February 16, 2004 8:02 PM To: madfox_vfp@... Subject: RE: [madfox_vfp] MadFox Meeting Are we planning to postpone this meeting
until next week?
?
I have not heard from
anyone.....
?
P.J.
?
|
Re: MadFox Meeting
PJ Fernandez
?
toggle quoted message
Show quoted text
Are we planning to postpone this meeting
until next week?
?
I have not heard from
anyone.....
?
P.J.
?
|
Re: MadFox Meeting
PJ Fernandez
?
toggle quoted message
Show quoted text
Anyone wants to bring a cake for
Eric?
?
P.J.
|