The Excel Reader requires that each worksheet has exactly the same structure.
The error you received says that your March 2020 Ofertas Registradas worksheet has a different structure to the January 2020 and February 2020 Ofertas Registradas worksheets.
If you investigate by importing all the relevant worksheets separately, you’ll see that the “Oferta ($)” column for January 2020 and February 2020 are being recognized as double floating point numbers, whereas in March 2020, it’s being recognized as an integer. This is the problem.
One solution is to use the following loop, where:
Excel files in the relevant folder are listed
File locations are converted to flow variables
The relevant sheet from each Excel file is imported using the Location flow variable
Sheets are concatenated as they are read
The Loop End node is configured to allow variable column types
The Excel Reader node will complain that the “DataSpec generated by configure does not match spec after execution.” but it will still run.
Thank you very much @elsamuel for your prompt answer.!
One last question
Once the table is created, those columns that differ in type, need to be manipulated in order to set the correct type for each row, isnt it?
Regards
hello hsrb,
yes, it will depend on you depending on the type you want to have in each column. For example, for a date column which is of type string you could use the node string to dateTime to change the type of this column.
Thank you @natte
Now I have run the solution given earlier and got another issue.
The time columns have no data in the consolidated excel table.
Take a look:
hi hsrb, it will suffice either in knime, choose as date type <> for the columns concerned and restart your workflow. oubien you will be able to directly modify the format of the cell in excel if and if the cell its format personalized date if not you will have to use always in excel in the toolbar, data, the tool <> to format your date .
You could use R to force all columns to first be imported as strings and convert them later after you have consolidated them.
You could also try and turn off the preview that would report the different types but you still might encounter problems later when bringing the data together.