Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
li-yu committed Jul 21, 2017
1 parent d5083a4 commit 1a2bc67
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ From v1.0.5, **not support xlsx** format any more, because poi ooxml lib and oth
[Release Notes](https://github.com/li-yu/SQLiteToExcel/releases)

## How to use
#### 1.Add Gradle dependencies
#### 1. Add Gradle dependencies
``` Gradle
compile 'com.liyu.tools:sqlitetoexcel:1.0.5'
```

#### 2.SQLite -> Excel Sample code(Specific examples can be found in [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/java/com/liyu/demo/MainActivity.java))
#### 2. SQLite -> Excel Sample code(Specific examples can be found in [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/java/com/liyu/demo/MainActivity.java))
```java
new SQLiteToExcel
.Builder(this)
Expand All @@ -30,7 +30,7 @@ new SQLiteToExcel
.start(ExportListener); // or .start() for synchronous method.
```

#### 3.Excel -> SQLite Sample code(Specific examples can be found in [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/java/com/liyu/demo/MainActivity.java))
#### 3. Excel -> SQLite Sample code(Specific examples can be found in [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/java/com/liyu/demo/MainActivity.java))
```java
new ExcelToSQLite
.Builder(this)
Expand All @@ -40,12 +40,12 @@ new ExcelToSQLite
.start(ImportListener); // or .start() for synchronous method.
```

#### 4.Thanks (how to support xlsx?)
#### 4. Thanks (how to support xlsx?)
- [https://github.com/centic9/poi-on-android](https://github.com/centic9/poi-on-android)
- [https://github.com/FasterXML/aalto-xml](https://github.com/FasterXML/aalto-xml)
- [https://github.com/johnrengelman/shadow](https://github.com/johnrengelman/shadow)

#### 5.Precautions
#### 5. Precautions
* When read or write external file, Android 6.0 and above need to deal with run-time permissions.
* When convert Excel to SQLite, take excel sheet first row as the database table column name, please refer to the style [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/assets/user.xls).
* Currently only blob field is supported as a picture, because I do not know whether byte [] is a file or a picture.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ SQLiteToExcel 库整合了 [Apache POI](http://poi.apache.org/) 和一些基本
[Release Notes](https://github.com/li-yu/SQLiteToExcel/releases)

## 如何使用
#### 1.添加 Gradle 依赖
#### 1. 添加 Gradle 依赖
``` Gradle
compile 'com.liyu.tools:sqlitetoexcel:1.0.5'
```

#### 3.SQLite -> Excel 示例代码(具体示例可参考 [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/java/com/liyu/demo/MainActivity.java) 工程)
#### 2. SQLite -> Excel 示例代码(具体示例可参考 [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/java/com/liyu/demo/MainActivity.java) 工程)
```java
new SQLiteToExcel
.Builder(this)
Expand All @@ -30,7 +30,7 @@ new SQLiteToExcel
.start(ExportListener); // 或者使用 .start() 同步方法。
```

#### 4.Excel -> SQLite 示例代码(具体示例可参考 [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/java/com/liyu/demo/MainActivity.java) 工程)
#### 3. Excel -> SQLite 示例代码(具体示例可参考 [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/java/com/liyu/demo/MainActivity.java) 工程)
```java
new ExcelToSQLite
.Builder(this)
Expand All @@ -40,12 +40,12 @@ new ExcelToSQLite
.start(ImportListener); // 或者使用 .start() 同步方法。
```

#### 4.感谢(如何支持 xlsx 可以参考以下仓库)
#### 4. 感谢(如何支持 xlsx 可以参考以下仓库)
- [https://github.com/centic9/poi-on-android](https://github.com/centic9/poi-on-android)
- [https://github.com/FasterXML/aalto-xml](https://github.com/FasterXML/aalto-xml)
- [https://github.com/johnrengelman/shadow](https://github.com/johnrengelman/shadow)

#### 5.注意事项
#### 5. 注意事项
* 读写外部文件时,Android 6.0 及以上版本需处理运行时权限。
* Excel 导入 SQLite 时,默认取 excel 中 sheet 的**第一行**作为数据库表的列名,样式请参考 [demo](https://github.com/li-yu/SQLiteToExcel/blob/master/app/src/main/assets/user.xls)
* 目前仅支持 blob 字段导出为图片,因为我也不知道 byte[] 是文件还是图片。
Expand Down

0 comments on commit 1a2bc67

Please sign in to comment.