thanks!! On Thu, Feb 4, 2010 at 10:33 AM, Thadeus Burgess <[email protected]>wrote:
> The issue is when you export the entire web2py database. It exports it > into a "meta" csv file. > > So its csv, but it has web2py generated metadata about what goes > where, try opening your exported csv file in a text editor and you > will see what I mean. > > This is why when you open in excel, it is unable to import back into > web2py. > > You have two options, export each table separately/import separately, > or chop up your db export into little files, edit them, then join it > back together to re import. > > -Thadeus > > > > > > On Thu, Feb 4, 2010 at 12:30 PM, Miguel <[email protected]> wrote: > > Hi > > > > I am running into weird issues with the csv import/export of the db. > > > > To start I use the following code to check the "dialect" of the csv > > files: > > import csv > > > > def DisplayDialect(file): > > csvfile = open(file) > > smple = csvfile.read() > > dialect = csv.Sniffer().sniff(smple) > > > > print " Delimiter :" + str(dialect.delimiter) > > print " Doublequote : "+ str(dialect.doublequote) > > print " Escapechar :" + str(dialect.escapechar) > > print " LineTerminator :" + str(dialect.lineterminator) > > print " Quotechar :" + str(dialect.quotechar) > > print " quoting :" + str(dialect.quoting) > > print " skipinitialspace :" + str(dialect.skipinitialspace) > > > > > > Here is what happens: > > > > CASE A: > > - Export the entire db to csv > > - The csv.sniffer generates an exception "Could not determine > > delimiter" > > - However I can import the file back in web2py > > > > CASE B: > > - Export the entire db to csv > > - Open the excel > > - The csv.sniffer can recognize the format > > - However I CANNOT import the file back in web2py > > > > > > Any suggestions here? This makes it impossible for me to add testing > > data in excel and import it back into web2py. > > > > Thanks > > Miguel > > If I export my entire DB and then I try to check the format with > > csv.sniffer using the following cod > > > > -- > > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]<web2py%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<web2py%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

