Failure in reading .xls file

Hello Together,

I have a very basic question. I am trying to read a file through “Excel Reader” node.
After specifying the file location and selecting the required options, the node is basically ready for execution (yellow signal)
However, once I try to execute the node, I get following error in console:

ERROR Excel Reader (XLS) 0:56 DataSpec generated by configure does not match spec after execution.

What does this mean?

Thank you in advance

Most likely you did not refresh preview window in the node configuration.

Hello @izaychik63, thank you for the response, but thats not the case. I even tried deleting the node and start all over again.
this is the node configuration I am using

Could it be the fact that you try to read 44 rows but header is row 46 try to read 46 lines.

@izaychik63 I tried doing that too. But that didn´t help.
No matter what I do, I get same message. I even tried creating new file and copying same data without any formating. Still I get the same message.

Hi there @Yuvraj,

have seen this error couple of times. Can you tell me more about your workflow design? Do you use loops or flow variables or only one Excel Reader and reading single file is what you do? Also what KNIME version are you using? If you can it would be great to share a workflow with example file where this can be seen? If data is condifential replace it with dummy data please.

Br,
Ivan

KPPs - Kopie.xlsx (295.2 KB)

Hello @ipazin , thank you for response.

I am using only one excel reader at the moment (starting point of the workflow). Then I will perform basic operations like column rename, filter etc. Then I am planing to bring this data together with other files in the bigger workflow by using Excel sheet appender. No flow variables are involved in the enitre workflow. I have used just basic nodes. I am using KNIME Version KNIME 4.1.2 I have attached a dummy file as an example. I could not read this file with following node configuration:

Thank you in advance

Yuvraj

Hi there @Yuvraj,

seems like there is some “garbage” in H4. That is troubling KNIME so it is replaced once in configuration and another time while executing which produces above mentioned error. Add some text (column name) there and it should work as expected.

EDIT:
(Internal reference: AP-14642)

Br,
Ivan

1 Like

You could always use R library readxl to skip initial rows and import the data. If necessary you could force all columns to be read as strings and convert them later if needed. You could also construct filenames or rename columns to your needs.

1 Like

hello @mlauber71 thank you for the workflow reference. I will try using this.

regards, Yuvraj

I usually get that error when I use “quick scan” option in the node. The workflow will work even with that error. It appears as if the “quick scan” option uses the values in the first few lines of data to determine data types per column, but if different values appear after those initial lines/values then the Excel Reader node kicks out this error as if trying to say: “I know that Quick Scan told you this column is a string data type, but I detected some integers in the same column.”

I now prefer using File Reader node, because there you can specify in the node what data type a column should be and I have experienced less memory issues when importing data.

Hope this helps.

2 Likes

Hello @Yuvraj ,

this seems to be addressed with new Excel Reader node available from version 4.3.0.

Check out release highlights here:

Br,
Ivan

2 Likes

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