: Excel Importer 11.2.1 fails to import accounting-style negative numbers (3) or (4) in StartImportByTemplate java action.

0
After upgrading the Excel Importer module from 10.7.2 to 11.2.1 (Mendix 10.24.0), we're facing an import issue.The same Excel file and import template work correctly with 10.7.2, but fail with 11.2.1 during the StartImportByTemplate Java action with the following error:java.lang.NumberFormatException: Character ( is neither a decimal digit number, decimal point, nor "e" notation exponential mark. We identified that the failing row contains an accounting-style negative number such as (3) or (4). Deleting that row allows the import to complete successfully.Has anyone experienced this after upgrading to Excel Importer 11.x?Is this a known issue or a change in number parsing?Is there a recommended workaround to support accounting-style negative numbers without modifying the source Excel file?Any insights would be appreciated. Thanks!
asked
1 answers
1

Hi Karthik,


The error points more to the value being read from Excel as text in accounting format, rather than an issue with the StartImportByTemplate microflow itself.


The important part of the exception is:

NumberFormatException:
Character '(' is neither a decimal digit, decimal point, nor 'e' notation...

So when Excel Importer reaches a value displayed like:

(3)
(4)

the parser is effectively trying to parse the ( character as part of a numeric value.

I would first check the actual Excel cell type, not just how it is displayed:

  • Select the affected cells in Excel.
  • Change the format from Accounting to Number or General.
  • Make sure the underlying value is actually numeric (-3, -4) and not text such as "(3)".
  • Save the file and try the import again.

You can also test this very quickly by entering:

-3
-4

in the same column with a normal Number format. If those rows import successfully, you've confirmed that the issue is the accounting-style representation.


The Excel Importer supports custom parsing through a Parse with microflow option, so if the source file cannot be changed, another approach is to import the value as a String and normalize values such as (3) → -3 before converting them to Decimal.


One other thing I would check after upgrading from 10.7.2 → 11.2.1 is the module dependencies/userlib. The current Marketplace release history shows that Excel Importer 11.1.3 included an integer parsing fix, and 11.2.x is based on Mendix 10.24.11.

So my troubleshooting order would be:

  1. Test the same value as a real numeric -3 instead of (3).
  2. Verify whether the affected Excel cells are Number or Text.
  3. If the source must remain (3), use Parse with microflow / String normalization.
  4. Check that there are no conflicting Excel Importer/Community Commons/Replication JAR versions in userlib after the upgrade.

If only (3) / (4) fails while normal negative values like -3 / -4 work, I'd consider this primarily an input-format/parsing issue, not a problem with your StartImportByTemplate flow.


Hope this helps.

answered