Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Nov 16, 2018 5:37 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Tue Sep 04, 2012 4:27 pm 
Offline

Joined: Sat Aug 22, 2009 9:44 am
Posts: 315
mbari wrote:
All I wanted was the name of the class that generates html files. Any ways, don't bother yourself and forget it.


Just write it out as a text file, that's all html is anyway. You could come up with your own class to help with it if you wanted, but it depends on how complicated you want to make things.


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Tue Sep 04, 2012 8:15 pm 
Offline

Joined: Wed Aug 22, 2012 6:45 pm
Posts: 20
elChupete,

If I type excelapplication on the LR that I have in my Mac's installation then following text along with an example appears. I am only pasting the text here, while the code of that example is in my initial post.
The language that you use to automate Microsoft Office applications is documented by Microsoft and numerous third-party books on Visual Basic for Applications (VBA). Microsoft Office applications provide online help for VBA. This is your primary reference for REALbasic office automation.
To access the online help, choose Macros from the Tools Menu of your MS Office application, and then choose Visual Basic Editor from the Macros submenu. When the Visual Basic editor appears, choose Microsoft Visual Basic Help from the Help menu. The help is contextual in the sense that it provides information on automating the Office application from which you launched the Visual Basic editor.
If VBA Help does not appear, you will need to install the VBA help files. On Windows Office 2003, Office prompts you to install the VBA help files when you first request VBA help. You don't need the master CD. On Macintosh, Office v.X does not install the VBA help files as part of the full install. Quit out of Office and locate your master CD. Open the "Value Pack" folder and double-click the Value Pack installer. In the Value Pack installer dialog, scroll down to the Programmability topic, select it, and click Continue. The installer will then add the VBA help files and examples to your Office installation. When the install finishes, the VBA help files will be available to the Visual Basic editor within all your Office X applications.
Microsoft has additional information on VBA at http://msdn.microsoft.com/vbasic/ and have published their own language references on VBA. One of several third-party books on VBA is "VB & VBA in a Nutshell: The Language" by Paul Lomax (ISBN: 1-56592-358-8).

In the 2nd last paragraph it discusses what to do before using excelApplication class on a Mac.


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Tue Sep 04, 2012 8:29 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
What you failed to quote was right above all of that

Quote:
ExcelApplication
Class (inherits from OLEObject)

This class is only available on the Windows platform.
For cross-platform development, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this class on an incompatible platform.

Used to automate Microsoft Excel. Supported on the Windows platform only.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Tue Sep 04, 2012 9:22 pm 
Offline

Joined: Wed Aug 22, 2012 6:45 pm
Posts: 20
You are right. I didn't mention that excelapplication class is inherited from OLEobject because I couldn't realize that OLEobject works on windows only. My bad.


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Tue Sep 04, 2012 10:18 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
mbari wrote:
You are right. I didn't mention that excelapplication class is inherited from OLEobject because I couldn't realize that OLEobject works on windows only. My bad.


Dude... READ THE WHOLE THING.... IT SAYS RIGHT IN THE LR (TWICE) [forget about OLEObject]

Quote:
This class is only available on the Windows platform.


It EXPLICITLY say it works only on WINDOWS... NO WHERE does it say or infer that it works on any other platform...
As a matter of fact it even tells you what to do to protect code written for other platforms

Quote:
For cross-platform development, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this class on an incompatible platform.


just from this topic.. it seems if YOU want them to work, then dang it they should work..... Documentation be damned (who needs to read anyways)..... Advice from other developers... ah forget them... they aren't saying what I want to hear.

If you won't READ, if you won't LISTEN... if you won't concede that ... then we can't help you.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Tue Sep 04, 2012 10:31 pm 
Offline

Joined: Wed Aug 22, 2012 6:45 pm
Posts: 20
wbgookin,

Quote:
Just write it out as a text file, that's all html is anyway.


It worked for me. Thanks a lot

I appreciate everybody's response on this.

DaveS, please save me from your precious suggestions on this one and in future too. I would REALLY appreciate it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Tue Sep 04, 2012 10:57 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
If you look closely at the docs snippet he posted, and infer a little from the fact that the Mac had a "different" help file, you would notice that this is obviously from an older version of RB, from before office automation was killed on the Mac and before the docs were all online. He must be running an old version of RB (which supports excelapplication) on a newer Mac OS (which doesn't).


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Wed Sep 05, 2012 12:20 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Then he must be using RealBasic 2007r4 or before... because RealBasic 2007r5 states "For Windows Only"

And this is from Help Files on my Mac (I have 2007r3 thru 2012r1)

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Wed Sep 05, 2012 11:03 am 
Offline

Joined: Wed Aug 22, 2012 6:45 pm
Posts: 20
I am working on a 2006 release


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Wed Sep 05, 2012 1:05 pm 
Offline
User avatar

Joined: Fri Jun 05, 2009 11:50 am
Posts: 348
Location: Hamburg, Germany
Quote:
I am working on a 2006 release


That would have been a REALLY useful information, that should have been included in your first post.

Whenever someone asks how this or that would work, one intentionally assumes one of the latest releases is used.

As functions become deprecated from time to time or new functions appear I would suggest to always name the used version of RB (at least if it is not one of the last 2-3 versions.

It is the same as for e.g.

If I ask in a Mac forum, why the latest version of App XYZ does not run on my Mac, it would have been useful if I mention, that I am using a PPC Mac from 2006 running Tiger. Especially if the App is provided as Intel Version only :D

_________________
Best regards

Stefan

Mac OSX Mountain Lion (latest Release) on a MacBook Pro 2.66 GHz Intel Core i7/ RB Professional 2011 Release 3


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Wed Sep 05, 2012 1:08 pm 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
Quote:
I am working on a 2006 release


Things have moved on.
As in so many areas, you can now do less these days! ;)

This one is at Microsoft's door. As I understand it, they simply took the ability away from Mac Excel.
You might be able to find a copy of Office 2004 but you can't rely on a customer owning it.

You can create a file that Mac Excel can open (even a CSV file will usually do) , and you can launch Excel to open it.
You just can't create an Excel object and 'drive it' in the way you can in Windows.


Top
 Profile  
Reply with quote  
 Post subject: Re: Couldn't generate an excel file in Mac
PostPosted: Wed Sep 05, 2012 2:08 pm 
Offline

Joined: Wed Aug 22, 2012 6:45 pm
Posts: 20
Quote:
would suggest to always name the used version of RB

I agree and will mention my version in future.

pony and kermit,
CSV thingie worked for me and my customer.

Thanks


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group