当我将我的一张 Google 表格下载到 csv 时,它会从我的值中删除前面的“0”。例如,“0666666”将变为“666666”。如何修改下面的代码以使其保持前面的零?谢谢!
def static_tabs():
static_tabs = ('Locating Media','Schedules')
for tab in static_tabs:
edit_ws = edit.worksheet(tab)
print ("EDIT"+format(edit_ws))
filename = str(tab) +'.csv'
with open('C:/Users/A_DO/Dropbox/2. The Machine/10. Edit and QC Google Doc/Edit/Static Tabs/' + filename, 'wb') as f:
writer = csv.writer(f,quoting=csv.QUOTE_ALL)
writer.writerows(edit_ws.get_all_values())
static_tabs()