This package avoids the requirements to install additional plugins in order to create a multi-worksheet Excel file.
Currently, suggestions made on DataIku forum is to create store the information on BytesIO
using openpyxl
, however, this method will create a corrupted Excel file.
The issue of corrupted file lead to the a creation of the following package.
TESTED ON: Dataiku Version: 8.0.4
- Python version 3.6 and up
- openpyxl installed in your env
DataIku currently offers multiple ways of constructing a folder, these are the settings that have been tested and were proven to be successful:
- Go to your Flow
- Click
DATASET
and selectFolder
- Insert name of the folder in
Label
and selectFilesystem
as a storage location (preferablyfilesystem_folder
).Partioning
:Not partioned
NOTE: Label is the name of the folder, that will be required as an input.
Import the package to your Library
section either using Git
> Import Git
.
Open up your notebook and import using:
from dataiku_multi_sheet import xlsx_constructor
Upon receiving 'Job is completed!' please check the assigned folder for an Excel file.
:param: file_name: Name of the Excel file to be created.
:param: folder_name: Name of the folder where the Excel file will be exported to.
NOTE: Please make sure that the folder exists. Follow README.md for more information.
:param: sheet_names: List of sheet names to be created in the Excel file. It is a list of strings.
:param: dataframe_list: List of DataFrames to be exported to the Excel file. It is a list of DataFrames.
:return: None