Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Android Sqlite CSV
Hi
I am developing simple an Android app where data will be export from sqlite to csv.Please explain how this can do?
 
Thanks in advance
 
Neeraj Rathi
Posted 25-Mar-13 1:06am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The command line version of the export database has the following syntax.
 
sqlite_export_cmd -database DATABASE -output FILENAME -table TABLENAME [-mode MODE]
sqlite_export_cmd -database DATABASE -output FILENAME -sql SQLCOMMAND  [-mode MODE]
sqlite_export_cmd -help
 
Available parameters:
 
-database DATABASE : The name of the SQLite database.
-output FILENAME : The filename of the output file.
-table TABLENAME : Table name of the table to be exported.
-sql SQLCOMMAND : A custom sql command
-mode MODE : The output format, optional.
If mode is not provided, the program will guess the right based on the extension of the filename.
Following are the diffrent values for MODE.
tabs: A tab separated file
csv : A command separated file
xls : An Excel file
html: A html file
screen: Show results on screen
 
-help : If parameter -help is provided, information about the usage is printed.
 

Please refer this LINK for android code required to dump an SQLite database to a file on the SD card in CSV format.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 5,170
1 DamithSL 4,357
2 Maciej Los 3,750
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,851


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 25 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100