Forum Discussion
Switching Data Source From one Excel Workbook to another updated version causes OLE DB or ODBC error
- 2 years ago
Thanks, that gave me the insight I needed to figure out the problem.
The two files are not identical after all. The new file was generated by a newer version of the script that generates the Excel Workbook. In the old version the date columns are a string that excel converts to a date. In the new version of the script the date columns are a datetime data type.
The report is modeled off of an Excel file that was output from the old script. The new output looks identical but Power BI sees the difference as {"LastLogonDate", Int64.Type} vs {"LastLogonDate", type date}.
Switching the query to "type date" for both date columns corrected it and now the report works.
Thank you.
You might try creating a new 'test' report from powerbi which connects to the updated Excel Workbook. You don't have to do anything except connect successfully.
--
If that works OK, compare the Advanced Editor code of the new 'test' report with the code on the original working report. If there are differences then you can address those.
If there are no differences, copy the Advanced Editor code from the original (from the lines after the connection steps) and add it to the new 'test' report Advanced Editor. There will be syntax problems which you will need to correct and some editing will be required but that should get a working 'new' report with the same transforms as the original.
Thanks, that gave me the insight I needed to figure out the problem.
The two files are not identical after all. The new file was generated by a newer version of the script that generates the Excel Workbook. In the old version the date columns are a string that excel converts to a date. In the new version of the script the date columns are a datetime data type.
The report is modeled off of an Excel file that was output from the old script. The new output looks identical but Power BI sees the difference as {"LastLogonDate", Int64.Type} vs {"LastLogonDate", type date}.
Switching the query to "type date" for both date columns corrected it and now the report works.
Thank you.