Reading and writing to a spreadsheet
by Dave D · in Torque Game Engine · 02/08/2006 (4:46 pm) · 7 replies
I have figured out how to read and write to a text file, piece of cake. No I am wondering how I can read or write to a speadsheet. Anyone done this or know how can show me the way?
#2
02/10/2006 (6:01 am)
Just after I posted this, a friend of mine suggested the Open Office, it must be cross platform. Thanks for the info.
#3
Couldn't you just do a tab delimited file that could be imported into any spreadsheet or database program? And to go the other way, just export to a tab delimited file from your application.
The allows you to work on the file with stock Torque script functions, such as getField().
- LightWave Dave
02/10/2006 (7:56 am)
Greetings!Couldn't you just do a tab delimited file that could be imported into any spreadsheet or database program? And to go the other way, just export to a tab delimited file from your application.
The allows you to work on the file with stock Torque script functions, such as getField().
- LightWave Dave
#4
So I'd try real hard to find a way around it. Remember you have to deploy the objects you use along with the app/game, to each OS, over whatever version the user may or may not have installed.
02/10/2006 (11:53 am)
Yes, I would go with Fulcrum's advise. Unless I had a very specific reason to use a spreadsheet object. Maybe if I was updating a complex spreadsheet, i.e. replacing only certain data or needed to modify inherent spreadsheet objects like formulas and such. (And even then a spreadsheet based macro manipulating a delimited input file is probably a better way to do it).So I'd try real hard to find a way around it. Remember you have to deploy the objects you use along with the app/game, to each OS, over whatever version the user may or may not have installed.
#5
02/10/2006 (12:09 pm)
My idea was, to better organize responses for an OFFLINE RPG, but the more I think about you guys are right. I am overly complexing the problem.
#6
We are even using spreadsheets for defining datablocks and audioprofiles, to get data more separated from code in our scripts.
02/11/2006 (6:00 am)
I agree with the tab delimited stuff. I haven't had the need to write stuff from Torque, but we are use it to feed data into our games.We are even using spreadsheets for defining datablocks and audioprofiles, to get data more separated from code in our scripts.
#7
Thanks for the help and info.
02/11/2006 (6:19 am)
I am using the RPGDialog and am trying to find a better way of storing the responses. The tab delimited file does sound like it will do what I want. I did make a preliminary test using them and it wokred the way I thought. Now just to polish it upThanks for the help and info.
Torque Owner Cisor
If you mean Excel you're talking the unwieldy MS Excel object library. You can include it in a C++ class and use the api quite easily to do simple stuff. This approach should work on Windows and maybe Mac (if you include the MAC Excel libraries), but will exclude Linux.