Skip to content

Excel to sqlite import not working #20

Description

@sakaravinth

Expected behavior

Import data from excel to sqlite

Actual behavior

message coming as imported but data is notthere in table

Steps to reproduce the issue

SQLiteOpenHelper helper = new DataAccessLayer.DatabaseHelper(DashboardActivity.this);
final SQLiteDatabase db = helper.getWritableDatabase();
// if you want to add column in excel and import into DB, you must drop the table
ExcelToSQLite excelToSQLite = new ExcelToSQLite(getApplicationContext(), DatabaseConstants.DATABASE_NAME, true);
// Import EXCEL FILE to SQLite
excelToSQLite.importFromFile(Environment.getExternalStorageDirectory().getAbsolutePath()+"/tblvanMST.xls", new ExcelToSQLite.ImportListener() {
@OverRide
public void onStart() {

        }

        @Override
        public void onCompleted(String dbName) {
            CommonUtils.showToast("Excel imported into " + dbName, DashboardActivity.this, coordinatorLayout_dashboard);
        }

        @Override
        public void onError(Exception e) {
            CommonUtils.showToast("Excel imported Error " + e.getMessage(), DashboardActivity.this, coordinatorLayout_dashboard);

        }
    });
    db.close();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions