コード例 #1
0
ファイル: cell.py プロジェクト: LEW21/pw-taio
 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
コード例 #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
コード例 #3
0
ファイル: read_only.py プロジェクト: LKI/PythonScripts
 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
コード例 #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