MCPcopy Index your code
hub / github.com/androidmads/SQLite2XL

github.com/androidmads/SQLite2XL @1.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.2 ↗ · + Follow
71 symbols 166 edges 11 files 3 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SQLiteToExcel

This is a Light weight Library to Convert SQLite Database to Excel and Convert Excel to SQLite.

Featured In

Android Arsenal

Sample App

The sample app in the repository is available on Google Play:

Get it on Google Play

Features

1.0.2

  1. Added support to add new column from excel while importing, if the column is not exists.

1.0.1

  1. Added Functionality to Import Excel into SQLite Database.
  2. Added Functionality to Export Blob into Image.
  3. Added Functionality to Export List of tables specified.

How to Download

add the following library in your app level gradle file

compile 'com.ajts.androidmads.SQLite2Excel:library:1.0.2'

How to Use

The steps to use this Library

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Export SQLite to Excel

This line is used to save the exported file in default location.
SqliteToExcel sqliteToExcel = new SqliteToExcel(this, "helloworld.db");
This line is used to save the exported file in used preferred location.
SqliteToExcel sqliteToExcel = new SqliteToExcel(this, "helloworld.db", directory_path);
This code snippet is used to Export a single table in a database to Excel Sheet
sqliteToExcel.exportSingleTable("table1", "table1.xls", new SQLiteToExcel.ExportListener() {
     @Override
     public void onStart() {

     }
     @Override
     public void onCompleted(String filePath) {

     }
     @Override
     public void onError(Exception e) {

     }
});
This following code snippet is used to Export a list of table in a database to Excel Sheet
sqliteToExcel.exportSpecificTables(tablesList, "table1.xls", new SQLiteToExcel.ExportListener() {
     @Override
     public void onStart() {

     }
     @Override
     public void onCompleted(String filePath) {

     }
     @Override
     public void onError(Exception e) {

     }
});
This code snippet is used to Export a every table in a database to Excel Sheet
sqliteToExcel.exportAllTables("table1.xls", new SQLiteToExcel.ExportListener() {
     @Override
     public void onStart() {

     }
     @Override
     public void onCompleted(String filePath) {

     }
     @Override
     public void onError(Exception e) {

     }
});

Import Excel into Database

The following snippet is used to initialize the library for Importing Excel

ExcelToSQLite excelToSQLite = new ExcelToSQLite(getApplicationContext(), "helloworld.db");

or To drop table while importing the Excel, use the following

ExcelToSQLite excelToSQLite = new ExcelToSQLite(getApplicationContext(), "helloworld.db", true);
The following code is used to Import Excel from Assets
excelToSQLite.importFromAsset("assetFileName.xls", new ExcelToSQLite.ImportListener() {
    @Override
    public void onStart() {

    }

    @Override
    public void onCompleted(String dbName) {

    }

    @Override
    public void onError(Exception e) {

    }
});
The following code is used to Import Excel from user directory
excelToSQLite.importFromAsset(directory_path, new ExcelToSQLite.ImportListener() {
    @Override
    public void onStart() {

    }

    @Override
    public void onCompleted(String dbName) {

    }

    @Override
    public void onError(Exception e) {

    }
});

Using SQLite2XL

Mail me with your Google Play URL and I'll add your app to the list :)

Icon App
Invoicer

Wiki

Please visit the wiki for a complete guide on SQLite2XL.

License

MIT License

Copyright (c) 2017 AndroidMad / Mushtaq M A

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated

documentation files (the "Software"), to deal in the Software without restriction, including without limitation

the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 

and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all

 copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT

NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 

IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 

SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Extension points exported contracts — how you extend this code

ImportListener (Interface)
(no doc) [2 implementers]
library/src/main/java/com/ajts/androidmads/library/ExcelToSQLite.java
ExportListener (Interface)
(no doc) [2 implementers]
library/src/main/java/com/ajts/androidmads/library/SQLiteToExcel.java

Core symbols most depended-on inside this repo

close
called by 14
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/db/DBQueries.java
showSnackBar
called by 5
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/util/Utils.java
open
called by 4
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/db/DBQueries.java
startExportTables
called by 3
library/src/main/java/com/ajts/androidmads/library/SQLiteToExcel.java
getItemId
called by 3
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/adapter/CustomAdapter.java
working
called by 2
library/src/main/java/com/ajts/androidmads/library/ExcelToSQLite.java
onStart
called by 2
library/src/main/java/com/ajts/androidmads/library/ExcelToSQLite.java
onCompleted
called by 2
library/src/main/java/com/ajts/androidmads/library/ExcelToSQLite.java

Shape

Method 58
Class 11
Interface 2

Languages

Java100%

Modules by API surface

library/src/main/java/com/ajts/androidmads/library/SQLiteToExcel.java16 symbols
library/src/main/java/com/ajts/androidmads/library/ExcelToSQLite.java11 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/SQLite2ExcelActivity.java8 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/Excel2SQLiteActivity.java7 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/db/DBQueries.java6 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/adapter/CustomAdapter.java6 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/model/Users.java5 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/MainActivity.java5 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/db/DBHelper.java4 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/util/Utils.java2 symbols
app/src/main/java/com/ajts/androidmads/sqlite2xlDemo/db/DBConstants.java1 symbols

For agents

$ claude mcp add SQLite2XL \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact