Example #1
0
 def value(self):
     """Get or set the value held in the cell.
         ':rtype: depends on the value (string, float, int or '
         ':class:`datetime.datetime`)'"""
     value = self._value
     if self.is_date() and value is not None:
         value = from_excel(value, self.base_date)
     return value
Example #2
0
 def value(self):
     """Get or set the value held in the cell.
         ':rtype: depends on the value (string, float, int or '
         ':class:`datetime.datetime`)'"""
     value = self._value
     if self.is_date() and value is not None:
         value = from_excel(value, self.base_date)
     return value
Example #3
0
 def value(self):
     if self._value is None:
         return
     if self.data_type == Cell.TYPE_BOOL:
         return self._value == '1'
     elif self.is_date:
         return from_excel(self._value, self.base_date)
     elif self.data_type in(Cell.TYPE_INLINE, Cell.TYPE_FORMULA_CACHE_STRING):
         return unicode(self._value)
     elif self.data_type == Cell.TYPE_STRING:
         return unicode(self.shared_strings[int(self._value)])
     return self._value
Example #4
0
 def value(self):
     if self._value is None:
         return
     if self.data_type == Cell.TYPE_BOOL:
         return self._value == '1'
     elif self.is_date:
         return from_excel(self._value, self.base_date)
     elif self.data_type in (Cell.TYPE_INLINE,
                             Cell.TYPE_FORMULA_CACHE_STRING):
         return unicode(self._value)
     elif self.data_type == Cell.TYPE_STRING:
         return unicode(self.shared_strings[int(self._value)])
     return self._value