Each worksheet can have a background image, available through SpreadsheetContent.worksheets[i].background_image. It is None when the worksheet has no background.
Extract information about worksheet backgrounds
fromgroupdocs.watermarkimportWatermarkerfromgroupdocs.watermark.options.spreadsheetimportSpreadsheetLoadOptionsdefextract_worksheet_backgrounds():withWatermarker("./spreadsheet.xlsx",SpreadsheetLoadOptions())aswatermarker:content=watermarker.get_content()fori,worksheetinenumerate(content.worksheets):background=worksheet.background_imageifbackgroundisnotNone:print(f"Worksheet {i}: background {background.width}x{background.height}")else:print(f"Worksheet {i}: no background")if__name__=="__main__":extract_worksheet_backgrounds()
spreadsheet.xlsx is the sample file used in this example. Click here to download it.
Worksheet 0: no background
Worksheet 1: no background