Excel tables exported from Access can't read Date/Time types
Created originally on Bitbucket by tfaris1 (Tom Faris)
Seems to be an issue with .xlsx exported from MS Access 2007 with Date/Time fields.
I've attached a sample table that replicates the problem. The table was exported with default options, using .xlsx format, nothing checked. I've noticed a few issues.
- Column detection appears to stop after the Date/Time column. Worksheet.get_highest_column should be 6 in the case, but returns 5. The number of rows is correct.
- The entire first row has None values
- The only columns with values that return not None are the first column, and the Date/Time column. The rest return None, even though there is data in the sheet.
#!python
>>> wb = openpyxl.load_workbook(filename=r'Table1.xlsx')
>>> wb.worksheets[0].get_highest_column()
5
>>> print wb.worksheets[0].rows[2][1].value
None
If I open the workbook in Excel and save it from there, everything works with no problems, so it looks like Access is doing something unexpected.
Attachments: Table1.xlsxTable1-XmlFromExcel.xmlTable1-XmlFromAccess.xml