影刀 —— 钉钉表格写入
效果展示:
注意一定要有一个一维转二维,为什么?
正常store_name_list获取到的是一个一维列表:
['smt全托管-家装(恒泰恒)', 'smt全托管-恒泰恒5(家装)', 'smt全托管-IC(烨泰达-2)', 'smt全托管-IC(烨明辉)', 'smt全托管-家装(烨明辉)', 'smt全托管-IC(鑫炜-2 家装)', 'smt全托管-IC(润达和美-2)', 'smt全托管-3C(润达和美)(张梓民)', 'smt全托管-3C(烨泰达)(张梓民)', 'smt全托管-IC(鑫炜-1)', 'smt全托管-IC(烨泰达-1)', 'smt全托管-IC(恒泰恒)', '速卖通 IC-8(烨泰达)', '(已完成退店)速卖通 3C-4 烨明辉(9月退店)', '(已完成退店)速卖通 Led-8(11月退店)', '速卖通 3C-3', '速卖通 Led-5', '速卖通 Led-4', '(已完成退店)速卖通 Led-6(25年3月退店)', '速卖通 Led-2', '速卖通 Led-3', '速卖通 Led-1', '速卖通 IC-1', '(已完成退店)速卖通 3C-2', '速卖通 IC-3', '速卖通 3C-7', '(已完成退店)速卖通 3C-1', '速卖通 IC-2']
这要写入的话只会行写入,而钉钉表格API严格要求数据列数必须与范围列数完全匹配;就会导致报错“
The number of columns in the data does not match the number of columns in the range.
The data has 14 but the range has 25.
”