Node "Excel Writer" Error/bug in KNIME 5.3.1

Hello Community,

We use the “Excel Writer” Node to write our results to file system. This file is used to update PowerBI.
With KNIME 5.2.1 no problem.
with KNIME 5.3.1 Power BI reports failure. (Can´t find the right sheet, it has problems with the navigation)
If we open with KNIME 5.3.1. written “result.xlsx” with Excel directly and save it without changes, Power BI loads without failure.
Are there any changes made in the Excel Writer Node with KNIME 5.3.1 ?
Greetings Alex

@Wile welcome to the KNIME forum. This sounds like this problem. You might try and remove the properties from the saved excel file:

1 Like

Thank you for your fast reply, I will test it!

tested and: It works!
But it´s not an issue with the author. We adapted the phyton script just to open and close the excel. and now it works:

import knime.scripting.io as knio
import pandas as pd
import openpyxl
import datetime
import os

Retrieve the file path from KNIME flow variables

v_excel_file = knio.flow_variables[“file_path”]
v_data_path = knio.flow_variables[“context.workflow.data-path”]

Load the Excel workbook

fh = openpyxl.load_workbook(v_excel_file)

Save the updated Excel workbook

fh.save(v_excel_file)

from my point of view this should not be. It seems that the original “Excel Writer” does something wrong.

1 Like

@Wile Excel as a way to transfer data is not optimal. In another thread there was the suggestion to use parquet to bring data to PowerBI. Maybe also try this.

1 Like

Thank you for your suggestion. We have to evaluate it, because some Excel files are also used by “humans” :slight_smile:
But also good to know, that the general issue is already known, so I can looking foward to any KNIME updates

1 Like

Hi @Wile,

we recently fixed a bug wrt. Excel Writer PowerBI compatibility in KNIME 5.3.2 (internal reference AP-23021, fixing “File contains corrupted data.” error). Could you try again with this version?

Though, I am a bit worried that it might not be the fix for your problem, since you report that PowerBI has trouble finding sheets/navigating them. We know of a bug in the underlying library (we’re tracking it with AP-22823), where sheet dimensions are not correctly updated to reflect the actual data, and PowerBI seems to be one of the only tools that cares about that, all other tools seem to just read the data that’s there (and it is, just the metadata is not accurate). The workaround is to write the file with the “Evaluate formulas” option checked. This makes it less usable for very large exports (because it has to hold everything in main memory to chase formula references), but updates the metadata correctly.

Best,
Manuel

1 Like

Hi @hotzm,
sorry for my late reply, I was on vacation.
I tested it with KNIME 5.3.2 and it works!!
Thank you a lot!
And by the way, I learned a lot with parquet :slight_smile:

3 Likes

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