in components/processing/libs/processor-xlsx/src/processors/xlsx/xlsx_generator.py [0:0]
def save(self, fname: GCSPath, min_sheets=1, max_sheets=4):
# Get the book
sheets = {}
for sheet in self.fake.words(
self.fake.random_int(min=min_sheets, max=max_sheets)
):
sheets[sheet] = self.get_sheet()
book = pyexcel.get_book(bookdict=sheets)
# Save
with fname.write_as_file() as f:
book.save_as(f)