openpyxl reads cell with format

Christopher Reimer christopher_reimer at icloud.com
Mon Jun 5 21:09:59 EDT 2017


On 6/5/2017 4:55 PM, Gregory Ewing wrote:

> Mahmood Naderan wrote:
>> from a button on a web page, I chose "export as excel" to download 
>> the data.
>
> Do you get an option to export in any other format?
> CSV would be best, since you can trivially read that
> with Python's csv module.
>
> If Excel is the only format available, you should
> complain to the website maintainers that their
> export function is broken and is corrupting data.

I had the opposite problem of converting the timestamp from a scraped 
web page into a timezone-aware timestamp to save into a CSV file that 
was sortable in Excel. It took me a while to figure out that my source 
timestamp was set to US/Eastern even though I was viewing it as 
US/Pacific on the website. I wrote down my thought process in a blog 
post that may help this situation.

https://www.kickingthebitbucket.com/2017/04/04/the-python-time-zone-rabbit-hole/

Thank you,

Chris Reimer




More information about the Python-list mailing list