Android Question [Localizer] B4XLocalizator.jar ....Again....

Cableguy

Expert
Licensed User
Longtime User
Running custom action. Error
(SQLException) java.sql.SQLException: [SQLITE_CONSTRAINT] Abort due to constraint violation (columns lang, key are not unique)
Error: (SQLException) java.sql.SQLException: [SQLITE_CONSTRAINT] Abort due to constraint violation (columns lang, key are not unique)

This is the error that the B4XLocalizator.jar throws when trying to parse my Strings.xlsx.
Note that I am 100% sure that my table contains no duplicate keys.
The tool was designed to be used with Excel xlsx files, and I think that it works ok with Excel produced files, but I can't afford the Office suite, specially when OpenSource options are available.
For this reason I am using LibreOffice Calc and saving the file as "Excel 2007 - 365 (*.xlsx)" format. If I don't manipulate the file too much, it goes quite some time without errors, but if I start re-organizing my strings, Then this error starts happening.

I guess that the file format LibreOffice puts out is not 100% Excel like and may contain some "artifacts" that the tool can't deal with.
So, can this tool be updated to use other file formats? If not, can we have the source code to try to do it ourselves?
 

AnandGupta

Expert
Licensed User
Longtime User
This is the error that the B4XLocalizator.jar throws when trying to parse my Strings.xlsx.
Note that I am 100% sure that my table contains no duplicate keys.
The tool was designed to be used with Excel xlsx files, and I think that it works ok with Excel produced files, but I can't afford the Office suite, specially when OpenSource options are available.
For this reason I am using LibreOffice Calc and saving the file as "Excel 2007 - 365 (*.xlsx)" format. If I don't manipulate the file too much, it goes quite some time without errors, but if I start re-organizing my strings, Then this error starts happening.

I guess that the file format LibreOffice puts out is not 100% Excel like and may contain some "artifacts" that the tool can't deal with.
So, can this tool be updated to use other file formats? If not, can we have the source code to try to do it ourselves?
Check for blank rows.
They give this error too.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Check for blank rows.
They give this error too.
Thanks for the reply, but.... That's not it!!
My current Strings.xlsx has 19 used rows... out of the few thousand that compose the worksheet, this is the same as Excel, and it does work with blank rows, which I use to separate subjects.

I did found the tool source code, but it relies in the XLUtils libs very heavily and the reading of the the excel file is done with a single line, so I cannot tap into the file parsing to understand what is being done.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
And.... it works again...
What I did?
I selected the entire worksheet, all 1 048 576 rows x 16 384 collumns (a simple ctrl +A) and then deselected the usefull rows...
Saved it and tried it... and it works.
So, its safe to say that:
Doing Copy/Cut/Paste in libreOffice leaves some kind of artifacts in the cells, and should be avoided.
There is always a way to recover ;)
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
@Cableguy : can you post your Strings.xlsx file? I use LibreOffice as well and have no problems with my file, could have a look to see what's different.
Hi Walt,
Thanks for the proposition... For now I got it working again... If I get the same issue again I'll reach out to you
 
Upvote 0

walt61

Active Member
Licensed User
Longtime User
Hi Walt,
Thanks for the proposition... For now I got it working again... If I get the same issue again I'll reach out to you

No prob! I suspected it would be something like that. Depending on how the worksheet was populated, rows and columns might appear to be unused, but can still exist and the cells are then picked up with empty strings as values. That's why the localizator complained about duplicate keys: there was more than one "" value (in both rows and columns).

An easy way to find out what LibreOffice Calc (or Excel for that matter) thinks is the last used cell, is to press Ctl+End on your keyboard and see in which cell you wind up.
 
Upvote 0

sanongpost

New Member
This is the error that the B4XLocalizator.jar throws when trying to parse my Strings.xlsx.
Note that I am 100% sure that my table contains no duplicate keys.
The tool was designed to be used with Excel xlsx files, and I think that it works ok with Excel produced files, but I can't afford the Office suite, specially when OpenSource options are available.
For this reason I am using LibreOffice Calc and saving the file as "Excel 2007 - 365 (*.xlsx)" format. If I don't manipulate the file too much, it goes quite some time without errors, but if I start re-organizing my strings, Then this error starts happening.

I guess that the file format LibreOffice puts out is not 100% Excel like and may contain some "artifacts" that the tool can't deal with.
So, can this tool be updated to use other file formats? If not, can we have the source code to try to do it ourselves?
This is imply mean you have setup table with FK_key when try to delete from table in will do cascade deletem or try to delete record but key exist in another table.
 
Upvote 0
Top