SQLite数据库编程转换成Android的Excel文件格式 [英] SQlite database programmatically convert into Excel file format in Android

查看:326
本文介绍了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

<一个href="http://stackoverflow.com/questions/1334802/how-can-i-use-external-jars-in-an-android-project">How我可以在Android项目使用外部JAR文件?

这篇关于SQLite数据库编程转换成Android的Excel文件格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆