SQLite数据库编程转换成Android的Excel文件格式

问题描述:

我正在开发Android应用程序,其中SQLite作为一个database.I要在导出我的Andr​​oid应用程序的数据库,以excel文件格式编程,使正常的人可以阅读他们的数据库easily.If有可能比请给我暗示或不不是帮助我转换,如文本文件或其他任何其他文件格式。感谢您投票了......

I am developing android app where SQlite as a database.I want to export my android app database in to excel file format programmatically, so that normal people can read their database easily.If it is possible than please give me hint or not than help me to convert any other file format like text file or other. thanks for voting...

Excel读取的CSV,所以这将是迄今为止是你最容易的选择。看一看opencsv

Excel reads CSV, so this would by far be your easiest option. Have a look at opencsv

http://opencsv.sourceforge.net

它包含了你需要pretty的每样东西。该过程变得简单:

it contains pretty much everything you need. The process becomes as simple as:

  1. 了解您希望从sqlite的导出数据。
  2. 将结果写入到CSV文件(记得它命名的的东西的.csv ,将让Excel中知道它的CSV文件)
  1. read the data you wish to export from Sqlite.
  2. write the results into a csv file (remember to name it something.csv, so excel will know its a csv file)

和多数民众赞成它真的:)

and thats it really :)

修改: 根据下面您的意见,我建议你先看看这个线程

EDIT: Based on your comments below, I suggest you take a look at this thread

How我可以在Android项目使用外部JAR文件?