inconsistent behavior of excel sheet appender and writer node

The excel sheet appender and writer node is showing a in my view inconsistent behavior with regards to treating different length of the
“Name of the sheet” (I call it “SheetName”.

First of all, Microsoft Excel has an internal (apparently hard) limit of 31 characters for a SheetName.

Excel sheet appender

Writing a 25 character long SheetName to a workbook works:

123456789_123456789_22+++ Ends up as: 123456789_123456789_22+++ (actual length in workbook: 25)

Once I try a 26 character long SheetName however:

123456789_123456789_22++++ Ends up as: 123456789_123456789_22… (actual length in workbook: 25)

So apparently the excel writer and appender node seem to enforce a different max length here (I checked the actual values in the underlying XML “workbook.xml” of the written excel file) as Excel itself would do.

There are several caveats also due to the fact, that any intended SheetName longer than 26 characters will end up becoming one and the same.
When using different similarly named variables (defining the SheetName”) this will cause the excel appender node to overwrite tabs with other content. (I know that I could set “Abort if sheet already exists”, but that is not desired in my workflow).

My proposal would be to:

a) Adjust the limits to become equal to Excel itself or perhaps make the length configurable
b) In any case, if there are intended SheetNames above the limit, this needs being reported

KNIME 3.7.1 / Windows 7 SP1

Best

Matthias

Hello @matthias.albus,

a bit late response but anyways to notify you that this was addressed with v4.3.0. See here for more:

Br,
Ivan

Hi @ipazin, thanks much. I will have a look and would indeed be super happy to finally remove the workarounds I had implemented (shortening of names).

best

Matthias

1 Like