Esempio n. 1
0
 def test_excel_col(self):
     assert_equal(exceltool.excel_column_number("A"), 1)
     assert_equal(exceltool.excel_column_number("Z"), 26)
     assert_equal(exceltool.excel_column_number("Z")+1, exceltool.excel_column_number("AA"))
     assert_equal(exceltool.excel_column_number("AZ")+1, exceltool.excel_column_number("BA"))
     assert_equal(exceltool.excel_column_number("ZZ")+1, exceltool.excel_column_number("AAA"))
     assert_equal(exceltool.excel_column_number("CAZ")+1, exceltool.excel_column_number("CBA"))
Esempio n. 2
0
 def test_excel_col(self):
     assert_equal(exceltool.excel_column_number("A"), 1)
     assert_equal(exceltool.excel_column_number("Z"), 26)
     assert_equal(exceltool.excel_column_number("Z")+1, exceltool.excel_column_number("AA"))
     assert_equal(exceltool.excel_column_number("AZ")+1, exceltool.excel_column_number("BA"))
     assert_equal(exceltool.excel_column_number("ZZ")+1, exceltool.excel_column_number("AAA"))
     assert_equal(exceltool.excel_column_number("CAZ")+1, exceltool.excel_column_number("CBA"))
Esempio n. 3
0
 def col(self, column):
     if isinstance(column, six.string_types):
         c_num = contrib_excel.excel_column_number(column, index=0)
         return self.col(c_num)
     else:
         assert isinstance(column, int)
         return self._x_index[column]
Esempio n. 4
0
 def col(self, column):
     if isinstance(column, six.string_types):
         c_num = contrib_excel.excel_column_number(column, index=0)
         return self.col(c_num)
     else:
         assert isinstance(column, int)
         return self._x_index[column]