14 lines
347 B
Python
14 lines
347 B
Python
|
|
import formatter
|
||
|
|
|
||
|
|
#规定表格中的数据格式
|
||
|
|
def table_formatter(row, col):
|
||
|
|
if col in [0, 4, 5, 6, 7]:
|
||
|
|
return formatter.integer() # 整数
|
||
|
|
elif col in [2, 3]:
|
||
|
|
return formatter.decimal() # 小数
|
||
|
|
elif col in []:
|
||
|
|
return formatter.kdecimal() # k#+###.###格式的小数
|
||
|
|
elif col in []:
|
||
|
|
return formatter.angle() # 角度
|
||
|
|
return None
|