Forum Discussion

leelio997's avatar
leelio997
New Member
4 years ago
Solved

OLE DB or ODBC [dataformat.error] file contains corrupted data

Hello everyone, I ran into this bug today.
I have a lot of excel in my source folder, one of the file name is 'Building contract cost breakdown_PT_HVB G28', when I clicked refresh, pbi showed normal refresh status window at first, I observed that pbi refreshed to this file and finished refreshing, no problem happened, then refreshed other files .
But at the end of the refresh, it showed that it was brushing a file that did not exist, the name of this file was '~$Building contract cost breakdown_PT_HVB G28', this ghost file had two more symbols '~$' than my real file, and then a bug message popped up.
I tried uninstalling pbi and deleting all the power bi folders in appdata, including all the files in temp, reinstalling pbi, and the refresh still shows the bug.
I tried to delete the 'Building contract cost breakdown_PT_HVB G28' file in the source folder, and the refresh still showed the bug.
I tried to change the source path and created a new empty clean folder with some other files in it, without 'Building contract cost breakdown_PT_HVB G28', and the refresh still shows the bug.
I'm going crazy. Can anyone help me?

  • Hi leelio997 ,

     

    The symbols '~$'  means the file is a temporary file when you work with this file. You can refer this post.~$ is in front of my file name. open it - Microsoft Community

     

    So you should delete the temp file after you save the file. Please eable the checkbox of hidden items and delete it.

     

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Icon for Community Support rankCommunity Support

    Hi leelio997 ,

     

    The symbols '~$'  means the file is a temporary file when you work with this file. You can refer this post.~$ is in front of my file name. open it - Microsoft Community

     

    So you should delete the temp file after you save the file. Please eable the checkbox of hidden items and delete it.

     

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • To add my solution as I had this problem and just solved it. As others here have mentioned, the small '~$' files are temporary/system files and PowerBI cannot load them - so it reports that there's corrupted data. I notice these files are generated when an Excel file is opened, and automatically deleted when the file is closed. Except sometimes it doesn't automatically delete. Normally this is not a problem as PowerBI will automatically add a "Filter out hidden files" query step for "Folder" type sources - but if you try to write your own from scratch (like I did because I had to load variably-named sheets from Excel files, rather than the same sheet name from every file like PowerBI auto-generates), you may miss out on that step and run into this problem. Also, from Windows Control Panel -> File Explorer Options -> Show hidden / Show System files will make these ~$ files visible so you can delete them manually from the folder if you don't want to add the "delete hidden files" query step back in. Hope that helps too.