please help me "how to save tinyDB to txt file or CSV file"

706 views
Skip to first unread message

jajalpekok

unread,
Jul 11, 2015, 9:55:39 AM7/11/15
to mitappinv...@googlegroups.com
Dear sir,

I have question,  I want to save data from tinyDB to .txt file or .csv file but I do not know how please help me


Thankyou...

Taifun

unread,
Jul 11, 2015, 10:16:24 AM7/11/15
to mitappinv...@googlegroups.com
use the file component, see also the documentation http://ai2.appinventor.mit.edu/reference/components/storage.html#File

SaveFile(text text, text fileName)
Saves text to a file. If the filename begins with a slash (/) the file is written to the sdcard (for example, writing to /myFile.txt will write the file to /sdcard/myFile.txt). If the filename does not start with a slash, it will be written in the program's private data directory where it will not be accessible to other programs on the phone. There is a special exception for the AI Companion where these files are written to /sdcard/AppInventor/data to facilitate debugging. Note that this block will overwrite a file if it already exists. If you want to add content to a file use the append block.

Please try something and if you got stuck, post a screenshot of your relevant blocks...

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn  App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by  Taifun.         


Reply all
Reply to author
Forward
Message has been deleted
0 new messages