2016-04-25 77 views

回答

1

是對於相同的輸入,如果設置在worksheet properties無證created日期:

import xlsxwriter 
import datetime 

for filename in ('hello1.xlsx', 'hello2.xlsx'): 
    workbook = xlsxwriter.Workbook(filename) 
    workbook.set_properties({'created': datetime.date(2016, 4, 25)}) 

    worksheet = workbook.add_worksheet() 
    worksheet.write('A1', 'Hello world') 
    workbook.close() 

然後:

$ cmp hello1.xlsx hello2.xlsx 

# No output. Files are the same. 

的順序串被添加到文件將更改sharedStrings表的佈局,從而導致不相同的文件。 Excel也是如此。