import csv
data = [[1,'more width cell',3],[4,5,6],[7,8,9]]
item_length = len(data[0])
with open('test.csv', 'wb') as test_file:
file_writer = csv.writer(test_file)
for i in range(item_length):
file_writer.writerow([x[i] for x in data])
data = [[1,'more width cell',3],[4,5,6],[7,8,9]] item_length = len(data[0])
with open('test.csv', 'wb') as test_file: file_writer = csv.writer(test_file) for i in range(item_length): file_writer.writerow([x[i] for x in data]) [/code]
теперь вывод
[code]1 ,4,7 more,5,8 3 ,6,9 [/code]
хочу
[code] 1, ,4,7 more width cell ,5,8 3 ,6,9 [/code]
Теперь все ячейки имеют одинаковую ширину. как можно увеличить ширину ячейки [b]больше ширины[/b]?