Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Oct 20, 2017 12:07 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Using Real Basic to automate Office applications on a Mac
PostPosted: Wed Mar 28, 2012 8:16 am 
Offline

Joined: Wed Mar 28, 2012 8:01 am
Posts: 4
What is the current status of using Real Basic for automating MS Office applications on a Mac?
I need to extract data from an Excel spreadsheet and insert these in Word templates in order to build Building Blocks for Word.
Both Excel and Word will be running on a Mac.
My development platform is on Windows 7 but the application needs to be run on a Mac.
Any suggestions would be most welcome.


Top
 Profile  
Reply with quote  
 Post subject: Re: Using Real Basic to automate Office applications on a Ma
PostPosted: Wed Mar 28, 2012 9:22 am 
Offline

Joined: Wed May 20, 2009 11:02 am
Posts: 423
Google this and you will get many answers: site:http://forums.realsoftware.com/ mac office

_________________
Using RS2011r4.3 on Windows7.


Top
 Profile  
Reply with quote  
 Post subject: Re: Using Real Basic to automate Office applications on a Ma
PostPosted: Wed Mar 28, 2012 10:37 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
pvman65 wrote:
What is the current status of using Real Basic for automating MS Office applications on a Mac?
I need to extract data from an Excel spreadsheet and insert these in Word templates in order to build Building Blocks for Word.
Both Excel and Word will be running on a Mac.
My development platform is on Windows 7 but the application needs to be run on a Mac.
Any suggestions would be most welcome.


Applescript is the way to go
They are very scriptable
But the integration with RB like it works on Windows is not available

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Using Real Basic to automate Office applications on a Ma
PostPosted: Thu Mar 29, 2012 5:53 pm 
Offline

Joined: Wed Mar 28, 2012 8:01 am
Posts: 4
Many thanks for the replies npalardy and pixe656.
I will follow up on the suggestions. Just a pity that the normal cross platform magic doesn't seem to work here.


Top
 Profile  
Reply with quote  
 Post subject: Re: Using Real Basic to automate Office applications on a Ma
PostPosted: Thu Mar 29, 2012 6:51 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
It'd be nice but MS has not supplied an updated SDK for Office on the Mac that would allows us to do anything

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Using Real Basic to automate Office applications on a Ma
PostPosted: Fri Mar 30, 2012 5:57 am 
Offline

Joined: Wed Mar 28, 2012 8:01 am
Posts: 4
Thanks for the clarification.
I know from an earlier posting that that was the situation about 16 months ago but I hoped that there might have been a change.
Well, I'll get my head down and find a solution. Once again thanks for your thoughts.


Top
 Profile  
Reply with quote  
 Post subject: Re: Using Real Basic to automate Office applications on a Ma
PostPosted: Fri Mar 30, 2012 7:49 am 
Offline

Joined: Wed May 20, 2009 4:43 pm
Posts: 958
Office documents from 2007+ are actually collections of XML files. If you know XML, you may be able to access the contents of the documents.

I don't know XML, but if you change the '.xls' extension of your Excel file to '.zip', you can unzip the file to access the XML files. You will find the worksheets in the 'xl' directory. I would also assume you could change the contents of the document by editing the XML file(s), but I don't know the specification, so making a change to one XML file may require you to make changes to one or more of the other enclosed XML files. The same applies to your Word document.

If you can edit the contents, then re-zip the file and set the original Office extension, and this might work to allow you to edit the documents directly.

_________________
RB 2009r4 Windows XP


Top
 Profile  
Reply with quote  
 Post subject: Re: Using Real Basic to automate Office applications on a Ma
PostPosted: Fri Mar 30, 2012 11:47 am 
Offline

Joined: Wed Mar 28, 2012 8:01 am
Posts: 4
Thanks for the suggestion. Given my total lack of experience with XML I'm inclined to leave this possibility for investigation at a later date. There are a couple of "low tech" options I'm going to explore first, especially since I can only have patchy access to a Mac for testing.


Top
 Profile  
Reply with quote  
 Post subject: Re: Using Real Basic to automate Office applications on a Ma
PostPosted: Fri Mar 30, 2012 12:29 pm 
Offline

Joined: Wed May 20, 2009 4:43 pm
Posts: 958
pvman65 wrote:
Thanks for the suggestion. Given my total lack of experience with XML I'm inclined to leave this possibility for investigation at a later date. There are a couple of "low tech" options I'm going to explore first, especially since I can only have patchy access to a Mac for testing.

Yeah, I don't know if I would want to touch that myself either, even if I did know XML. But it may be a viable option to someone with the experience and time to look into it, at least theoretically. And, it may be of use to someone who may need to pull other items from the document; for example, I believe you would have easy access to any images (as folderItems) in a word document by using this method.

_________________
RB 2009r4 Windows XP


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

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