https://kedro.org/ logo
#questions
Title
# questions
v

Valentin Voigt

09/29/2023, 1:00 PM
Hi 🙂 Is it possible to load an excel file via catalog into a Kedro node while keeping the formatting of the excel? I would normally use the openpyxl function load_workbook for that. Thanks a lot in advance!
d

datajoely

09/29/2023, 1:02 PM
So we use the native pandas implement which I’m pretty sure doesn’t preserve this. The quickest solution is to make a custom dataset which does things the way you normally do it
y

Yetunde

09/29/2023, 1:39 PM
Hi Valentin, I think this actually may be possible. I just had a look at the implementation of the
pandas.ExcelDataset
and it's default engine is
openpyxl
. Here's the code. What happens when you create a dataset entry, using this structure?
d

datajoely

09/29/2023, 2:12 PM
I think the pd.read_excel method will discard formatting even if they use openpyxl to parse it