Excel Write To File Local vs Network Path with multiple sheets

I am having an issue writing multiple sheets to an Excel File. It works perfectly when I path the file to any location on my local computer (desktop, C: drive, etc). But when I try to write to any location on our server, the first sheet works, but when Dynamo tries to write the subsequent sheets i get an error as seen in the attached image, and the data on the subsequent sheets does not write to the file.

Is this a limitation of the node itself?

Network Excel Fail

I am sorry I cannot help with your question, however I would love to see how you wrote multiple sheets to one workbook. Thank You!

Hi Ben,

Not sure if you found an answer. Maybe try using the UNC path instead of mapped path? Haven’t seen your code, could spaces in the path be causing the issue? Maybe make sure the path is within quotes?

 

Wow…talk about a blast from the past. I’d forgotten about having this issue. I think the problem was related to 0.7 and I no longer have a problem writing multiple excel sheets in 0.8.

BridgetC - See image below for how to write to multiple Excel Sheets. The trick is to use List.Combine, and feed in multiple lists of sheet names and Data.WriteMultipleExcelSheets

 

 

Hi Ben,

Just trying to understand how this is working for you. Why are you taking the export from the write to file node when no data is being written to it? Surely any lists need to be combined and fed into this or am I just being stupid?

I have a script which writes data to separate sheets but I’ve got 2 problems;

  1. Dynamo is creating completely new sheets rather than just amending the data

  2. It is writing all the data from the starting cell, not just a single sub list on each sheet.

Any ideas?

Cheers

K.

Keith-

I am feeding data into the Excel.WriteToFile node, but it is tied into the node via List.Combine. Note that I left 2 parts of the node unfilled - the Sheet Name and the data.

By leaving the ports unfilled, I am leaving the Excel.WriteToFile as a function. That Function is looking for the two unfilled inputs, and it receives the information it needs from the two lists I am feeding into List.Combine (similar to list.map except with multiple inputs). List.Combine uses the function provided to operate on the input lists, so the first index of the two input lists creates {(A,B,C),(1,2,3)} on sheet “Sheet 1” in the excel file at the given path, then List.Combine repeats for the second index in each input list, etc… The end result is one excel file with multiple sheets inside of the file.

I wish I could help you with your specific problems, but without seeing your script it’s difficult to visualize the issue you are having or the desired result.

you could also use Bumblebee to write multiple sheets to Excel and it’s not even hard…no fancy List.Combine is needed. :slight_smile: Just saying.

Hi Konrad,

This looks very interesting indeed… however for some reason I can’t seem to get it to work even with basic data, it keeps giving me a null list from the BBData node - can’t for the life of me see what I’m doing wrong…

Hi Ben, I think I get what you are doing - it adds a new level for me as to how you can use the nodes which is very interesting. Unfortunately due to the way the write to excel node works I can’t do what I need to just now - hopefully though I can pursue the bumblebee route if I can get it to work.

Thanks for your help and the explanation though - it was very helpful.

Bumblebee needs an update to 0.9 which I will take care of tomorrow. If you open the file and change the path from 0.8 to 0.9 it will work.

Haha, you say that like it’s the easiest thing in the world and if you actually know what you are doing I suspect it probably is… I think though I’ll wait patiently until you update it rather than me break things here (which I seem to have a remarkable ability to do!!), I’ve plenty to be getting on with!

cheers

K.

well I am saying it because it is:

Capture1

 

Do you know, I did try that but it didn’t seem to work so I figured it must have been the wrong path I was changing… I also seemed to have managed to install the BB package in a strange place but that’s another story…

anyway, thanks for the info and the updated package, very much appreciated.

cheers

K.

Thanks Konrad - the problem was with where the package had installed itself - this is probably something to do with me although I couldn’t honestly tell you what that would be.

Anyway after my first initial trial it looks very promising - thanks again for your efforts and putting these nodes out there, it’s very much appreciated.

Cheers

K.

I have recently updated Bumblebee to account for custom installation locations on users network drives. it should work fine in 1.0

1 Like