简体   繁体   中英

Created xlsx file delete written formula

I create an excel file via slsxwriter and want to put there a formula. I'm doing it like this:

sheet.write(2, 6, "=IF(AND(ISBLANK(J2); ISBLANK(K2); ISBLANK(L2)); \\"PASSED\\"; \\"FAILED\\")")

trying also this:

sheet.write_formula(2, 6, "=IF(AND(ISBLANK(J2); ISBLANK(K2); ISBLANK(L2)); \\"PASSED\\"; \\"FAILED\\")")

But when I later open created xlsx file, excel want to 'repair' my file and is deleting the formula... (Removed Records: Formula from /xl/worksheets/sheet1.xml part)

When I was putting it by hand in excel it works great.

Anyone has an idea what is going on?

Formulas are stored in Excel in US English, no matter what language you are actually using. The US English separator is the comma ( , ), not semicolon ( ; ).

See the section titled "Non US Excel functions and syntax" in the chapter "Working with Formulas" in the official documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM