Re: Openpyxl cell format

2017-06-05 Thread Gregory Ewing
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 pr

Re: Openpyxl cell format

2017-06-05 Thread Jon Ribbens
On 2017-06-05, 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. I have a vague memory that Excel stores dates as integers, so if you were to read the raw data you would

Re: Openpyxl cell format

2017-06-05 Thread Lele Gaifax
Mahmood Naderan via Python-list writes: > 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. I think that openpyxl isn't doing any heuristic translation on cell's content, but I could be wrong: I b

Re: Openpyxl cell format

2017-06-05 Thread Mahmood Naderan via Python-list
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. Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: Openpyxl cell format

2017-06-05 Thread Lele Gaifax
Mahmood Naderan via Python-list writes: > With openpyxl, it seems that when the content of a cell is something like > "4-Feb", then it is read as "2016-02-04 00:00:00" that looks like a calendar > conversion. > > How can I read the cell as text instead of such an automatic conversion? I'm not 10

Openpyxl cell format

2017-06-05 Thread Mahmood Naderan via Python-list
Hello guys, With openpyxl, it seems that when the content of a cell is something like "4-Feb", then it is read as "2016-02-04 00:00:00" that looks like a calendar conversion. How can I read the cell as text instead of such an automatic conversion? Regards, Mahmood -- https://mail.python.org/m