- class Blobject(source=None, name=None, filename=None, blob=None)[source]#
A wrapper for a binary file – rarely used directly.
So named because it’s an object representing a blob.
“source” is a specification of where to get the data from. It can be anything supported by Blobject.load() which are (a) a filename, which will get loaded, or (b) a io.BytesIO which will get dumped into this instance
Alternatively, can specify
blobwhich is a binary string that gets stored directly in the
This function loads the spreadsheet from a file or object. If no input argument is supplied, then it will read self.bytes, assuming it exists.
Return a file-like object with the contents of the file.
This can then be used to open the workbook from memory without writing anything to disk e.g.
book = openpyxl.load_workbook(self.tofile())
book = xlrd.open_workbook(file_contents=self.tofile().read())