def open(self): if self.filename is None: raise IOError("No filename specified") if not os.path.exists(self.filename): raise IOError("Cannot find file '%s'" % self.filename) self.sheet = None if self._data is not None: self.sheet = self._data else: try: self.sheet = ExcelSpreadsheet(self.filename, ctype=self.ctype) except pyutilib.common.ApplicationError: raise