Closed
Description
I am using this library to export a SQLite database to an excel readable file. I use Room Persistance Library as an abstraction over SQLite database to write to the database, but I think that shouldn't matter (I may be wrong). I am using the following code to export the database:
sqLiteToExcel = new SQLiteToExcel(getActivity().getApplicationContext(), "testdb.db", path);
sqLiteToExcel.exportAllTables("test.xls", new SQLiteToExcel.ExportListener() {
@Override
public void onStart() {
}
@Override
public void onCompleted(String filePath) {
Toast.makeText(getActivity(), "Successfully exported database", Toast.LENGTH_LONG).show();
}
@Override
public void onError(Exception e) {
Toast.makeText(getActivity(), "Error in exporting database: " + e.getMessage(), Toast.LENGTH_LONG).show(); Log.d(TAG, e.getStackTrace()[0].toString());
}
});
However, when I try to open the file using MS Excel, it gives me The file cannot be opened because it is corrupt
error. What is wrong here? How can I solve this?
Thanks in advance
Metadata
Metadata
Assignees
Labels
No labels