Excel Reader - How to retain empty cells?

@LB_Knime the OpenPyxl is quite easy to use in case someone sees this thread in the future. It basically works like this:

import knime.scripting.io as knio
import pandas as pd

v_excel_file = knio.flow_variables['file_path']
v_name_sheet = knio.flow_variables['Name_Excel_sheet']

df = pd.read_excel(v_excel_file, sheet_name=v_name_sheet, engine='openpyxl')

knio.output_tables[0] = knio.Table.from_pandas(df)
3 Likes