How can I use the nodes “Add a Worksheet” then “Add a Worksheet Row” for MS 365 Excel? My issue is on the “Add a Worksheet Row” node where I’d like to set the “Worksheet” field to the “Name” item {{31.name}} from the “Add a Worksheet” node, thus adding a row to the worksheet that would be created when the scenario runs. When I put the “Name” item in the field, I get error “[404] The requested resource doesn’t exist” and the “Row” fields don’t show up for me to map the row.
I could temporarily use an existing sheet with the desired row format to map the row, save, then replace the sheet name with “Name”, and save. However, when I reopen the node, the error is back and the “Row” fields are gone again, so I can’t make updates.
1 Like
Hi @Trip_Dixon
This is because you are dynamically mapping the sheet name. However, once that named sheet is created, it will work. So this shouldn’t be the matter to worry about.
Regards,
Msquare Automation - Platinum Partner of Make
@Msquare_Automation
Yes, if I configure the “Add a Worksheet Row” node with the hack I mentioned of “temporarily use an existing sheet with the desired row format to map the row”, the scenario will run and write to the new sheet. However, the issue is that when I reopen and edit the “Add a Worksheet Row” node, the row mappings are gone, and I get the 404 error again because it is looking for a sheet named {{31.name}} which it cannot find. I then need to recreate the workaround to make any edits. This is unsustainable with the number of nodes I have.
As common as this “create new sheet → add a row” flow must be, I figure there must be a best practice, non-workaround way to do this.
Hi @Trip_Dixon, That 404 error is a pity. Does that still happen if you just run ‘create spreadsheet’ module by itself, then save the scenario and reload the page? It should register that that variable really exists and will permit you to start the scenario avoiding the 404.
Hi @kudracha. Thanks! Yes, the 404 error still happens even after I just run the “Add a Worksheet” node, save the scenario, then open the “Add a Worksheet Row” node. See screenshots.
I’m not sure what you mean by reload the page though. Do you mean the whole browser page? If so, I tried that with the same results.
@Trip_Dixon, How do you determine name of newly created worksheet ? Could you set a ‘name’ variable just before worksheet and use both for ‘add a worksheet’ and ‘add rows’ modules as a worksheet name reference ?
I’m setting the name of the sheet to the current date.
I tried what you suggested by setting a variable (varNameOfSheet ) prior to the “Add a Worksheet” node and using that variable in both nodes as the worksheet name reference. The scenario will run successfully, but it still shows the 404 error when I try to edit the “Add a Worksheet Row” node. I’m not sure how Make handles variables during the build process. When I open the “Add a Worksheet Row” node to edit it, the varNameOfSheet variable obviously isn’t resolving to its value.
@Trip_Dixon, Ok… back to the basics - (1) What happens if you write name of the sheet in Add rows manually without mapping? And (2) when the sheet is created, does it have exactly the same name as you wrote in ‘add sheet’ module ? look for whitespaces and whatnot.
@kudracha
(1) If I write the name of the sheet in “Add a Worksheet Row” but the sheet doesn’t actually exist in the spreadsheet, I get the 404 error.
(2) Yes, if I manually put in a name for the sheet in the “Add a Worksheet” node and run just that node, the sheet is created with the exact same name.
I also tested adding a name for the sheet (“test_sheet2”) in the Name field of “Add a Worksheet” and added the same name in the Name field of “Add a Worksheet Row”. I ran just the “Add a Worksheet” node, saved the scenario, then opened the “Add a Worksheet Row” node and I DON’T get the error. This is because the sheet actually exists in the spreadsheet. So the “Add a Worksheet Row” node just doesn’t like it when there is no actual existing sheet to reference.
@Trip_Dixon, Getting back to this photo :
If this is not possible, I don’t think we can improve the situation and you’ll have to contact customer service / suggest an improvement. That being said, instead of just running the ‘set variable’ module and looking at ‘Add rows’ module, you need to run the whole scenario and see if the error happens. The alert is real, because the sheet does not exist.
@kudracha Thanks for your help on this. For now, I’ll just live with the inconvenience of the error. Best of luck to you.