Using excel with Runtime Revolution

LiveCode is RunRev's 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: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Using excel with Runtime Revolution

Postby 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.
djayc2104
 
Posts: 2
Joined: Thu Apr 10, 2008 12:28 am

Postby 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 is here: http://qery.us/44g
The book "Programming LiveCode for the Real Beginner" is now available! Get it here! http://qery.us/3fi
Mark
Livecode Opensource Backer
Livecode Opensource Backer
 
Posts: 5001
Joined: Thu Feb 23, 2006 9:24 pm

Postby 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/revolution/tips/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
Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium

Postby djayc2104 » Sun Apr 27, 2008 5:12 pm

Thank you all for your help.
Cheers
djayc2104
 
Posts: 2
Joined: Thu Apr 10, 2008 12:28 am


Return to Getting Started with LiveCode - Experienced Developers

Who is online

Users browsing this forum: No registered users and 2 guests