1. Convert file format to prevent Chinese garbled: Save excel in CSV (comma delimited) (*.csv) format, close the file, open the. CSV file that you just saved with Notepad, and then save as UTF-8 Rich text. It is important to note that, after such a conversion, the numbers are all translated into text.
2, through the ADB shell (adb.exe stored in the Android Development Software installation folder, such as F:\Develope\Tools\adt-bundle-windows-x86\sdk\ Platform-tools\) Change the use rights of the SQLite database. Open the AVD virtual appliance before running ADB. Run under command line: F:\DEVELOPE\TOOLS\ADT-BUNDLE-WINDOWS-X86\SDK\PLATFORM-TOOLS>ADB Shell-- run adb shell [Email protected]:/# cd/data/data/com.example.dgtaxt/ --Enter your project's folder [Email protected]:/ #chmod 777 databases to change Databases folder permissions to all users 3, confirm that the database has a corresponding table, if not to create first. You can use the Sqlite3 command to create a table in the ADB shell. such as: [Email protected]:/data/data/com.example.dgtaxt/databases # sqlite3 dgtaxt.db ---Open the desired database dgtaxt.db sqlite>create TABLE dgtaxt201311 (_id NVARCHAR) PRIMARY KEY, name NVARCHAR, Complay nvarch AR (100)); -- means to create a table dgtaxt201311. 4 . Use the ADB push command to copy the files on your hard disk to the Databases folder of an application in Android AVD. such as: f:\develope\tools\adt-bundle-windows-x86\sdk\platform-tools> adbpush F:\Develope\\Java\ Test\utf8.csv data/data/com.example.dgtaxt/databases-- put the utf8.csv file into the Databases folder 5. Import data to SQLite database. such as:f:\develope\tools\adt-bundle-windows-x86\sdk\platform-tools>adb Shell--Restart the shell[Email protected]:/# CD data/data/com.example.dgtaxt/databases[Email protected]:/data/data/com.example.dgtaxt/databases # sqlite3 dgtaxt.dbsqlite>. Separator ', '--comma delimitersqlite>. Import utf8.csv dgtaxt201311- fromutf8.csv importing data into table dgtaxt201311Complete.