Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
z = '">%.15g' % (cell)
elif type == DataTypes.INLINE_STRING:
z = '" t="inlineStr">%s' % escape(
to_unicode(cell))
elif type == DataTypes.DATE:
z = '">%s' % (DataTypes.to_excel_date(cell))
elif type == DataTypes.FORMULA:
z = '">%s' % (cell[1:]) # Remove equals sign.
elif type == DataTypes.BOOLEAN:
z = '" t="b">%d' % (cell)
if style:
return "
def __str__(self):
return Range.coordinate_to_string(
self._start) + ":" + Range.coordinate_to_string(self._end)
def __str__(self):
return Range.coordinate_to_string(
self._start) + ":" + Range.coordinate_to_string(self._end)
def get_xml(self):
attrs = {
'topLeftCell':
Range.Range.coordinate_to_string((self.y + 1, self.x + 1))
}
if self.freeze:
attrs['state'] = 'frozen'
if self.x:
attrs['xSplit'] = self.x
if self.y:
attrs['ySplit'] = self.y
attr_str = " ".join('%s="%s"' % item for item in sorted(attrs.items()))
return to_unicode("" % attr_str)