Jupyterlab, pandas, xlsxwriter: file not created

Viewed 43

Running Jupyterlab on Linux. Notebook reads and completes with no error but does not produce the excel file. Xlsxwriter code as follows:

file = "my_file.xlsx"

writer = pd.ExcelWriter(file, engine='xlsxwriter')
df.to_excel(writer, sheet_name='products')

wb = writer.book
ws = writer.sheets['products']

...etc



writer.save()
writer.close()

It runs ...no errors, but nothing is created. A full home directory search turns up nothing.

1 Answers

If there are no errors, then you should be able to find your file in your notebook's current working directory. You can run:

import os
os.getcwd()

in your notebook to see the current working directory.

Related