Mahmood Naderan wrote:
Maybe... But specifically in my case, the excel file is exported from a web page. I think there should be a way to read the content as a pure text.
What form are you getting the file in? Are you being given an Excel file, or are you loading a text file into Excel? The problem is that when it reads a csv file, Excel aggressively turns anything it thinks looks like a number into a number, and anything it thinks looks like a date into a date. There are ways to avoid that, but they all rely on having access to the csv file before loading it into Excel. Once it's in Excel, the data has already been corrupted and there's nothing you can do about it. If you have access to the original data as a csv file or some other text format, I would suggest eliminating Excel altogether and just read the original file with Python. -- Greg -- https://mail.python.org/mailman/listinfo/python-list