Resolver One Library Documentation

API for ImageWorksheet

Back to documentation index page.

Classes

Class ImageWorksheet

class ImageWorksheet(object):
    def __init__(self, name, image):

ImageWorksheet represents worksheets used to display an image rather than contain cells.

It is not intended that you create an instance of ImageWorksheet directly, but instead you should call AddImageWorksheet on the workbook.

The following code adds an image worksheet to the workbook, using an Image object from System.Drawing.

from System.Drawing import Image
image = Image('C:\images\BigPicture.jpg')
workbook.AddImageWorksheet('My Picture', image)

The worksheet name will have '(IMAGE)' shown in front of it in the spreadsheet tabs.

Attempting to add an image worksheet with the same name as a non-image worksheet will raise a TypeError.

If there is already an image worksheet with the same name, then the old image will be replaced with the new one.

Properties

Image

Image = property(get, set)

A get and set property for accessing the image displayed on the ImageWorksheet.

Setting the Image attribute to an object which is not a subclass of System.Drawing.Image will have undefined results.

Name

Name = property(get)

A get only property that returns the worksheet name as a string.