xlsxwriter:是否可以在关闭方法之前打开并查看工作簿?

xlsxwriter: Is it possible to open and see the Workbook before the close method?

为了调试和校准不同的东西,我想在过程开始时打开工作簿,即

wb = xlsxwriter.Workbook()

我也试过 with 语句:

with xlsxwriter.Workbook() as wb:

但我没有找到任何允许我在关闭方法之前打开 excel-sheet 的东西。我很确定有一个选择。

非常感谢您的帮助。

Is it possible to open and see the Workbook before the close method?

没有。在您调用关闭之前不会创建文件(使用 close() 显式或使用 with 时隐式)。