Python removes excel space and line feed, and reports an error ‘Int’ object has no attribute ‘strip’


Found a section of code on the Internet, run after the error, which friend help to see

#Remove except spaces and empty lines

Error in operation result:

D:\Testing_Software\Python38\python.exe D:/Code/PycharmProjects/test_rigang/utile/

Traceback (most recent call last):

File “D:/Code/PycharmProjects/test_rigang/utile/”, line 87, in


File “D:/Code/PycharmProjects/test_rigang/utile/”, line 80, in clear_blank_space

ws.cell(i, j).value = old.strip().replace(‘ ‘, ‘’).replace(“\n”, “”)

AttributeError: ‘int’ object has no attribute ‘strip’

This work adoptsCC agreementReprint must indicate the author and the link of this article

Recommended Today

[Q & A share the second bullet] MySQL search engine, after watching the tyrannical interviewer!

Hello, I’m younger brother. A few days ago, I shared the second interview question, the interview site of search engine in MySQL. This question is the interview at normal temperature. After reading it, I’m sure you will gain something in terms of database engine If you haven’t read my first share, you can refer to […]