Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Run excel script- workbook not found



I build a flow that call a script to update excel column. 

But sometimes it cannot run successfully, the error message shows that workbook not found.

↓ sometimes it work successfully, sometimes not.


↓ error details: 
We were unable to run the script. Please try again.
Workbook not found.
clientRequestId: a7c1c298-fd1e-4f8f-b41f-102aa0bfdf08



I think the reason might be our member will filter the excel while the script update the column. 

I tried to unhide the worksheet and ran the flow again, but it still failed.

Could anyone tell me the actual reason why the script sometimes can run and sometimes not?

and how to resubmit the flow again and run the script successfully?


Thanks in advance! 



Could you post the script and workbook details so I can try and repro it?

Helper I
Helper I

Hi @GeoffRen 


following is the script:


function main(
  workbook: ExcelScript.Workbook,
  sheetName: string,
  tableName: string,
  pn: string,
  orderNumber: string,
  shipDate: string,
  oeNumber: string) {

  const tbl = workbook.getWorksheet(sheetName).getTable(tableName);
  const rowCount = tbl.getRowCount();
  const values = tbl.getRange().getValues();
  const pnIdx = 14;
  const orderNumberIdx = 25;
  const ScheduledshipDateIdx = 38;
  const oeNumberIdx = 39;

  for (let i = 1; i <= rowCount; i++) {
    if (values[i][pnIdx] == pn && values[i][orderNumberIdx] == orderNumber) {
      tbl.getRange().getCell(i, ScheduledshipDateIdx).setValue(shipDate);
      tbl.getRange().getCell(i, oeNumberIdx).setValue(oeNumber);



sheetName: Raw Data

tableName: 表格2


But there are lots of data in my workbook, may I ask that what kind of information do you need?

Helper I
Helper I

hi @GeoffRen 


I'm considering that the reason why my script cannot work successfully might be the data is too large?

Now, there are around 86,000 cells in my worksheet. (sheetName: 'Raw Data')

I tried to run the script in 'Raw Data', there is nothing change.

But if I tried to run the script in 'Raw Data_test' which only has 500 cells, it works!



It shouldn't be a size issue, I can run a script successfully on a file with 700,000 x 26 cells filled in. Do all scripts fail when run on this workbook? What happens if you moved this file to a different location and run it? So if it's on SharePoint what happens if the file lives in OneDrive?

Helper I
Helper I

Hi @GeoffRen 


I tried to copy the excel to the same SPO folder with a new name and ran the script on the copied workbook, it worked successfully. 😮 so it's really not the size issue.

therefore, I'm considering that if the script cannot run successfully might be that multiple users edit the workbook in the same time?




Are these all the same 404 error? If it's failing due to multiple edits at the same time we'd probably expect a different error than 404. It sounds like the original workbook might have something wrong with it. Can you post the error details of another recent one (including the clientRequestId)?

Helper I
Helper I

Hi @GeoffRen 


Yes, there are all 404 error. clientRequestId: f8c469c3-8ab5-491e-9b90-c1e893cfc6c8


but it's weird... all the setting were the same but the flow worked fine today... 

If you want my guess, if it's working now then this was probably a bug from SPO and it just took them a couple days to fix it and deploy it. If it keeps happening just let me know and I can keep looking into this!

Helper I
Helper I

Hi @GeoffRen 


OK, I will keep tracking on this issue, if it happen again, I will let you know. 🙂

Thanks for your assistance.

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,274)