Using excel with Runtime Revolution

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
djayc2104
Posts: 2
Joined: Thu Apr 10, 2008 12:28 am

Using excel with Runtime Revolution

Post by djayc2104 » Sun Apr 20, 2008 11:01 pm

First of all I would just like to say that Revolution is a great piece of Software.
I need a bit of help regards a new application I have designed. It stores data into a database and what I would like to know is:
Can I export my data to excel using a command or commands in Revolution to produce reports?
As a newbie to revolution, I dont just want to buy and download an add-on but with a bit of guidance I would like to design and learn by doing it myself.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Apr 21, 2008 8:37 am

Dear djayc2104,

You can write data to a text field and import this file into Excel. The quickest way:

Code: Select all

put fld x into url "file:/Macintosh HD/Documents/file.txt"
On a PC this would look similar to:

Code: Select all

put fld x into url "file:C:/Documents and Settings/My Documents/file.txt"
Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Mon Apr 21, 2008 12:30 pm

While exporting to tab-delimited or CSV formatted text is easy, there are other ways:
- Office 2003 and higher support an XML format (SpreadsheetML) which doesn't support macro's and all that stuff, but is great for quickly creating actual XLS files in a non-binary way.
- On a Mac, you can use AppleScript, and on Windows, VBScript, to create Excel files and fill in cells interactively. See http://www.sonsothunder.com/devres/revo ... iac001.htm for more information.
You'll want to keep a bookmark for Ken Ray's Sons of Thunder website, as it contains real gems of information.

Hope this helped,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

djayc2104
Posts: 2
Joined: Thu Apr 10, 2008 12:28 am

Post by djayc2104 » Sun Apr 27, 2008 5:12 pm

Thank you all for your help.
Cheers

Post Reply