0

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:

  1. the files are generated in the same way from the same system.
  2. 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 x-ms-apihub-cached-response as false and takes 5 seconds to complete, while all the other deletions return true and 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.

10
  • Are you using check in/check out? – Callum Crowley Nov 30 '20 at 10:58
  • @CallumCrowley There is nothing to check in/out. The repository does no have any files or older versions as the Power Automate job cleans them out every night. – Eleshar Nov 30 '20 at 22:41
  • Have you checked library settings > manage files with no checked in version? Files created by another user with no checked in version would not be visible to your user. – Callum Crowley Nov 30 '20 at 22:49
  • The attribute x-ms-apihub-cached-response doesn’t seem to do anything with the flow functioning, if I have understood it correctly, it has something to with improving performance: docs.microsoft.com/en-us/azure/api-management/… Turning false possibly suggests that the flow has trouble getting hands with the file and gets a timeout from the service side. What is the error you are running into when trying to save/upload the file? – Chelsea_MSFT Dec 1 '20 at 7:58
  • @Chelsea_MSFT There is nothing specific, the saving just fails - Excel top bar says simply "Save failed" and when saving through VBA, the error message is slightly more verbose but not any more specific. – Eleshar Dec 1 '20 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.