SQLite2XL icon indicating copy to clipboard operation
SQLite2XL copied to clipboard

Excel to sqlite import not working

Open sakaravinth opened this issue 6 years ago • 0 comments

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();

sakaravinth avatar Feb 19 '19 11:02 sakaravinth