data_process_ui/app/script/format_coord_calc.py

16 lines
351 B
Python
Raw Permalink Normal View History

2026-01-12 09:21:42 +08:00
import formatter
#规定表格中的数据格式
def table_formatter(row, col):
if row < 2:
return None
if col in [2, 3, 5, 6, 8, 9, 10, 12, 13, 14, 15, 16]:
return formatter.decimal()
elif col in [1]:
return formatter.kdecimal()
elif col in [4, 7, 11]:
return formatter.angle()
elif col in []:
return formatter.integer()
return None