Page 1 of 1

Looking For Example: Txt Import, Manipulate, Export

Posted: Fri Mar 26, 2010 8:57 pm
by MrBill
Hello- I'm an UBBER NEWBIE to RR and programing so be kind :D

Instead of asking a bunch of how to's I'm going to ask a 'where's an example' question.

I'm looking to build a little application that imports data that was exported from excel in cvs (txt) format, manipulate it in RR, and export the results back out in the form of cvs (txt). I could always do this in XML, but I'm not experienced in XML so I'm a bit nervous about doing this.

Any examples of a csv import/export application? I need to learn how to import, store, manipulate, and export. To me, this seems monstrous but to many of you, this is probably a breeze.

Thanks! Looking forward to getting to know RR.

Mr. Bill :o

Re: Looking For Example: Txt Import, Manipulate, Export

Posted: Fri Mar 26, 2010 9:20 pm
by RRobert
You could put a file into a field or variable by using the put command.

Code: Select all

put URL ("file:/Users/Example/Desktop/example.csv") into field "Field"
Manipulate it with replace for example.

Code: Select all

replace comma with tab in field "Field"
And also save it with the put.

Code: Select all

put field "Field" into URL ("file:/Users/Example/Desktop/example.csv")
Look for put, char, chunk, word, item, line, replaceText, replace, matchText, ... in the Dictionary or User Guide.

See also How do I rename the headers on a text file? and How do I export a csv file?

Robert

Re: Looking For Example: Txt Import, Manipulate, Export

Posted: Fri Mar 26, 2010 9:51 pm
by MrBill
Hey- Thanks Robert. This helps me know what to look for.

I also just found this example as well:
http://lessons.runrev.com/spaces/lesson ... ble-Field-

Now I need to figure out how to get the individual pieces of data into a grid like structure, mathematically manipulate it (functions), and export it it back out... Let the learning begin.

Thanks for the help!
- Mr. Bill

Re: Looking For Example: Txt Import, Manipulate, Export

Posted: Fri Mar 26, 2010 10:37 pm
by MrBill
Actually, on that note, I can't for the life of me find the Data Grid tool in the tool's palette. Does it not exist in Revolution Media 4.0 for Mac? Or maybe this is for RunRev Studio.

Is there a Data Grid Tool in Revolution Studio?

Thanks.

Re: Looking For Example: Txt Import, Manipulate, Export

Posted: Fri Mar 26, 2010 10:43 pm
by bn
Bill,
no datagrid in RevMedia. RevStudio and up.
regards
Bernd
If you want to go for a table field have a look at http://revonline2.runrev.com/stack/428/ ... agDividers

Re: Looking For Example: Txt Import, Manipulate, Export

Posted: Sat Mar 27, 2010 3:40 pm
by RRobert
But you could use a Table Field which is available in RevMedia and maybe sufficient.

Robert