Jan 20 2023 01:58 PM
I am trying to read a datasource (CSV) into Power Query. I keep getting DataSource error saying that it cannot read the file. This happens whether I try using "Get Data" or just editing an existing query so that it points to a different source.
An exception occurred: [DataSource.Error] Access to the path '/my/path/to/the/file.csv' is denied. (Session ID: 6cc4c6b5-96d6-4d58-b68a-f20fcab1aa8f)
Sometimes, If I make a copy of the file, then I can import that copy. But if I change the name back to what I want it to be named, then it can't connect. It's the same file, just with a different name.
Sometimes when I go to Get Data, all the potential choices (ie.. all the CSV files) are grayed out. But if I rename one of the files then that one will (sometimes) not be greyed out and I can select it. But if I change it back to the name I want, then it grays out again.
Very frustrating as a simple duplication task (ie. duplicating a query and then adding a different source) has become very hard indeed.
Any ideas why this might be happening?
Mar 15 2023 07:59 AM
@Brett Kraiger have you resolved the problem? I have the same issue with JSON files
Mar 15 2023 01:06 PM
Apr 06 2023 12:14 PM
@Brett Kraiger got the same issue, how did you solved it ?
Apr 06 2023 12:25 PM
@MHLachaps the trick is to always use the wizard to open the json, do not rename or move the json file.
This is the only way I found. Probably the wizard automatically creates some permission on the file (not at the file system level, it is something within excel). In excel for mac there is no way to change these permissions once created by the wizard
Apr 06 2023 01:24 PM
May 01 2023 07:45 AM
@caprinalim Thx, not a JSON but just a simple excel csv. I have tried it all (rename, change directory, delete and expert again, ...) for 1 of the 2 files it worked, not for the other one (same source though ...)
Jul 29 2023 10:06 AM
Jul 29 2023 10:28 AM
Aug 16 2023 10:08 AM
Aug 22 2023 03:50 AM
Aug 22 2023 03:58 AM
Aug 25 2023 09:35 AM - edited Aug 25 2023 09:36 AM
I've got the same issue and I've just spent a couple of hours with MS tech support but did not get a solution. My issue only occurs when trying to import from a network folder. Interestingly the first tech support agent got me to run the license removal tool and after doing that the issue was resolved in a test file. I then tried my project Excel file and initially the problem persisted, but I then browsed to the file again in the wizard and then it imported successfully. I then tried the same process on other datasources in the same excel file but it did not work.
I have also tried opening my excel file in the Windows version and setting privacy to none and also setting the ignore privacy flag in the file. None of those steps helped, when I open it on mac its still not working.
Aug 30 2023 12:39 AM
Sep 19 2023 10:04 PM
@Brett Kraiger I had the same problem and nothing seemed to work (extra permissions, etc).
The problem occurred after changing the filename and although the name in de source path was exactly the name of the file (same capitals letters), it didn't work anymore.
At last I removed all capital letters in the filename and also removed the capital letters in de source path in Power Query. Suddenly the file was accessible again.
Sep 20 2023 06:03 AM
Thank you for taking the time to post. I removed capital letters and it worked for me also, mad!
I only had to change the filename caps to lower case and 'browsed' to the source file and it all worked.
Thank you!
Oct 25 2023 10:11 AM
Mar 27 2024 04:23 PM
Apr 08 2024 09:25 AM
@Brett Kraiger make sure your files are on a physical drive and not a virtual drive. This is a common error.
Sep 03 2024 10:26 AM - edited Sep 03 2024 10:28 AM
@Brett Kraiger One option which helped me is the following:
Go to Data -> Get Data (Power Query) -> Data Source Settings and then click on "Change File Path" to choose the file you would like to load.
It did not let me load the original file, but I was able to change the name to a different one i.e. load-test.csv was throwing permission error, but when I changed file path to load-test1.csv, it started working.
Hope this helps someone.