On Wed, Sep 9, 2009 at 3:16 PM, Yarko Tymciurak <yark...@gmail.com> wrote:

> On Wed, Sep 9, 2009 at 3:01 PM, Yarko Tymciurak <yark...@gmail.com> wrote:
>
>> On Wed, Sep 9, 2009 at 2:51 PM, Noynoy <lowiew...@gmail.com> wrote:
>>
>>>
>>> .....

>
>>> If there are sample codes on how to upload and read csv file using
>>> web2py, it will be very much appreciated.
>>>
>>
> csv export an import is rather trivial -
>
> When you create your own "new" application, it uses the "welcome" app as a
> boilerplate (makes a copy);
>
> If you look in your apps  controllers/appadmin.py file at  csv() (for
> exporting a table) or import_csv(), you will see what you need to do.
>

Suggest you USE these first from the admin interface; that way you will see
the format of the headers, and can decide [1] what you want to require users
to have in their csv, and [2] what, if anything, you want to do for
validating or making valid the headers.

You'll notice that the id field is not used in import (so you can add to a
table).

Have lots of fun!

- Yarko


>
> Regards,
> - Yarko
>
>
>>
>>> Thank you.
>>>
>>> Noynoy
>>>
>>> >>>
>>>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to