I have a Teams sharepoint library where I am uploading reports in .xlsx format on regular basis for further processing by PowerQuery etc. I have particular issues uploading one of the reports, called HRRPT1.xlsx. To upload the files, I am using a macro that does certain actions (creates a table etc.) and then saves the file on the Sharepoint location. The macro succeeds with all other reports but fails with this file. There is nothing specific about it, it is not the largest file, it does not have any specific contents, nothing. The issue seems to be tied specifically to the name.
When I create a new, blank Workbook and save it as HRRPT1.xlsx to that location manually, I am encountering exactly the same issue. When I try saving it e.g. as HRRPT0001.xlsx, it succeeds. My suspicion was initially that it may be an issue with a non-unique name (albeit the other reports had no such problems, they simply overwrote the files from previous day, no questions asked), so I even implemented a PowerAutomate flow to delete the file from the previous day, but to no avail.
Additional observations: The issue occurs in about 90 % of the cases, sometimes it succeeds... I am able to get the file there manually by saving it to my drive and drag-n-dropping it to the library (into the browser) or uploading it through the library interface. It is just the saving method that is met with the difficulty.
EDIT: further observations:
- the files are generated in the same way from the same system.
- the Power Automate flow to delete the files seems to succeed but when I audit the flow results, I noticed one small detail being different about the HRRPT1.xlsx - specifically that this particular action return
falseand takes 5 seconds to complete, while all the other deletions return
trueand are accomplished immediately.
EDIT2: The issue does not seem reproducible in other libraries or even subfolders. I deleted the subfolder the issue exists in and created it anew with the same name, however the problem still persists. Also before you ask, the file length or size should not be a problem - this filename hass length of 10, the others have same or more. The size is 13-14 MB, which is large, but another report has 23-26 MB.