I am created a CSV File in python.So it created a csv file.When i opened that file in excel some #### characters are shown.When i increase the width of that column manually it prints the original data. By programmically any chances are there to increase the width of that column.Sample code is shown below.Thanks in advance for your replies.
import csv
from datetime import datetime
csvData = ([[datetime.now().date(), datetime.now().time().strftime("%I:%M:%S %p")]])
with open('test.csv', 'a') as csvFile:
writer = csv.writer(csvFile, delimiter=',', quoting=csv.QUOTE_ALL,
lineterminator='\n')
writer.writerows(csvData)
csvFile.close()
CSV=Comma Separated Values, it does not have any properties associated with values, hence excel uses its default settings to display its values. For writing an *.xls file you may use xlwt module, and for *.xlsx files XlsxWriter module.