World: r3wp
[Windows/COM Support]
older | first |
Robert 16-Jul-2009 [456] | And, I not just need to generate XLS files I need to read data from XLS files as well that don't use an XML format. |
james_nak 16-Jul-2009 [457] | Point taken. Robert. |
Robert 29-Jul-2009 [458x2] | Any idea how I can get rid of the "Do you want to save changes" dialog when I close an XLS workbook? |
I hate VBA... I tried: sendValue excel-app ".DisplayAlerts = %s" "False" and objectMethod excel-app ".ActiveWorkbook.Close(SaveChanges:=False)" both with no effect. To be more specific, the effect is that ComLib/Disphelper just exit. | |
ChristianE 29-Jul-2009 [460] | Have you already consulted http://support.microsoft.com/kb/213428/EN-US/ ? Maybe that's what you're looking for. The trick seems to be to do set ThisWorkbook.Saved = True, so that Excel responds as though the workbook has already been saved and no changes have occurred since that last save. |
Robert 29-Jul-2009 [461x2] | I did. And I solved it. The problem is that ComLib didn't knew about logic! and XLS uses TRUE/FALSE as logic value not as string. |
Now it works. | |
Robert 1-Sep-2009 [463x2] | Hi, I'm again struggeling with XLS automation via ComLib. |
I want to do: VBA-Code: ActiveSheet.Copy After:=Workbooks(2).Sheets(3) And I use: objectMethod excel-app ".ActiveSheet.Copy After:=Workbooks(%d).Sheets(%d)" reduce [workbook worksheet] But this doesn't work. XLS creates a new document with the copy worksheet inserted. Looks like the stuff after .Copy isn't recognized. Any idea? | |
Anton 27-Dec-2010 [465x2] | Graham asked, when using COMLib-Anton, can you pass a decimal to Excel? |
Well, looking at the demos/excel.r file, you can see integers being passed in with %d in the format string. That file worked for me last time I tried it, as I noted in the script header. That would have been on WinXP. | |
GrahamC 27-Dec-2010 [467] | Yes, and %d is an integer mask so decimals passed to it end up as integers |
Robert 27-Dec-2010 [468x2] | I have extened the excel dialect to handle decimal! as well. The code in the dialect looks like this: | ['set | 'change] opt 'cell set row integer! set col integer! set val [string! | integer! | decimal!] ( ; ? val ; print [row col] switch type?/word val [ string! [ ; filter all illegal characters replace/all val {"} "'" replace/all val {,} " -" replace/all val newline "; " sendValue excel-app ".ActiveSheet.Cells(%d,%d) = %s" reduce [row col val] ] integer! [sendValue excel-app ".ActiveSheet.Cells(%d,%d) = %d" reduce [row col val]] decimal! [sendValue excel-app ".ActiveSheet.Cells(%d,%d) = %e" reduce [row col val]] ] |
I will update the excel dialect on my homepage as soon as I'm back home. | |
GrahamC 27-Dec-2010 [470] | This looks like Benjamin's original comlib ? |
Robert 28-Dec-2010 [471] | I'm not sure, as I blended the two and made some changes. What I remember is, that I had to add support for decimal! to the excel dialect I used. |
GrahamC 28-Dec-2010 [472] | Has anyone used these dialects to generate server side Excel spreadsheets and then returned them to the browser? |
Robert 29-Dec-2010 [473] | No, but if you want to do this, create HTML files with XLS endings using TABLE. Excel will magically load these as normal XLS files ;-) |
GrahamC 29-Dec-2010 [474] | table? |
Robert 29-Dec-2010 [475] | HTML TABLE I mean. |
GrahamC 29-Dec-2010 [476] | interesting ... |
Anton 30-Dec-2010 [477x2] | %d is an integer mask --- oops, I confused it with Rebol's decimal! |
In COMLib-anton, decimal! is not currently implemented. I think that was because none of the demos used it | |
james_nak 22-Oct-2011 [479] | When my Skype client upgraded itself my Rebol Skype app which I use to switch audio in and out sources failed. Turns out the the new Skype4com.dll (1.0.36) needs to have those NULL's when using getobject. Thanks to Graham for mentioning the use of NULL awhile back. Oh, a great app I used to register and unregister the dll's while testing is RegDllView http://www.nirsoft.net/utils/registered_dll_view.html. |
GrahamC 22-Oct-2011 [480] | James .. what is this application? And what exactly does it do? |
james_nak 22-Oct-2011 [481] | Actually I based it on your skype.r app. All it does is set the audioin and audioout settings. I have a Plantronics bluetooth handset and earpiece but it doesn't support Skype voicemail messages so every time I received one I had to go to the tools and switch out the audio to my computer speakers and back again. It also seems to cause some slight interference when I had to enter touchtones so I wrote this little gui that simply lets me change those. Nothing special but it is a real time saver and with the touchtones a call saver since you have to enter tones pretty qucikly sometimes. |
GrahamC 22-Oct-2011 [482] | Good to know I'm not the only person using Skype with Rebol |
james_nak 22-Oct-2011 [483] | Well, it's thanks to you Graham. I noticed that the original twitter client in RebolTutorial used your http-tools.r |
Luis 22-Oct-2011 [484] | James, Is your switch audio code public ? |
james_nak 23-Oct-2011 [485] | Luis, I just uploaded it to rebol.net. It's called myskype.r One weird thing that happened when I was getting it ready to post was that it stopped working with Skype4com.dll version 1.0.36. It started doing the same thing in spite of the NULL. I noted that in the file and went back to 1.0.33. |
GrahamC 23-Oct-2011 [486] | rebol.org |
james_nak 23-Oct-2011 [487] | Yeah, sorry. .org. It's late here. I was reading up on the Skype 1.0.33 and it looks like there were some install and usage issues though I don't know if that has anything to do with what I was experiencing. |
Luis 24-Oct-2011 [488:last] | Thanks for share your work ! |
older | first |