New Excel Reader Node is forcing wrong field type

I have the new Excel Reader between a “Table Row To Variable Loop Start” and a “Loop End”. It is having problems reading the first file as it is trying to force a field type on the file and it doesn’t seem I can turn this off and just normalize the types inside the loop. Am I missing something?

1 Like

Also, the error in the Console also does not display a line number for easy debugging.

And…it is working with the old (Deprecated) node. It just makes the field type a “?” instead of a “Double”.

Hi @AndrewDeacon

I am not sure if I understand your problem. Could you share a workflow or, at least, a screen shot with us?

Best,
Simon

1 Like

Here is a screenshot of the node for a more simplistic question.

Unfortunately, the source data includes a “-” for missing numerical data in the file (I am working on that), but in the older version of the node it would just make the field type a “?” and pull in the data and then I could sort it out in the workflow. The new version seems to be enforcing “Double” on the fields and erroring on the “-”. When I go to the dropdowns, my choices are only numerical types. Is there a way to not force the field type (the “enforce types” doesn’t seem to have an effect on this issue).

1 Like

Hi @AndrewDeacon,

can you try increasing the number of rows used for scanning on the “Advanced Settings” tab? You can also remove the limit. Probably you only have doubles in the first 50 rows (current default), that’s why the type is detected as double. We are going to increase this default value as others seem to have similar issues.

Best,
Simon

1 Like

That’s probably what the issue is. I am sure there are only a handful of those “-” values in a very large source file. Thanks for the help.

1 Like

I have a similar issue. When reading in multiple files, one of my columns has decimal values in a couple of files and the other files don’t have the values as decimals (for the same column). With the preview set a 50, KNIME defaults the type to Integer in the new Transformation tab. When I try to execute (with the preview setting), the errors out with the attached error. If I remove the limit for the number of rows scanned (basically read the whole file) I can read in the files successfully. The problem I have is that the source files are large so this is a bit time consuming and sometimes doesn’t work. In the transformation type, the only option initially is change the type in the numeric columns to (Integer or Long), why wouldn’t Double be a valid option also?

Once I scan everything, KNIME defaults the column to Double

knime_excelReader_dType_error.txt (3.5 KB)

1 Like

Hi @pqrussell,

thanks for this feedback, we received similar from others. We are working on improving this. For now, the only option for you is to scan the whole file. Sorry for the inconveniences.

Best,
Simon

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.

Hello @AndrewDeacon and @pqrussell,

this was addressed with KNIME version 4.4.0 so now you can choose String instead of Double and Double instead of Int (and more). Enjoy!

Br,
Ivan