Creating and Writing To a New Excel Spreadsheet

I’m attempting to start a new spreadsheet when I run my script for the first time in a Revit file, and then write to it as well. I’d like to write a new sheet each time I run it again with a new object selected. (That’s the idea anyway).

What do I need to do to the workflow below to make this happen? I had it originally referencing a file to write to that I premade, but I’d like to not have to open Dynamo to select which file I want to write to. I’d prefer to simply have the Dynamo workflow read the Revit file name and name the excel file accordingly.

Have you successfully created a new excel file using your setup in the BLUE group?

I have not, and I’m wondering if it is because I do not have data to input yet. I’d like to tell it where to write the data on the spreadsheet (like startRow and startCol in the orange side). Any ideas why?

I have, on the other hand, successfully placed the data on the orange side to a predetermined file, while each new run successfully made a new sheet titled exactly how I wanted it (using the name of the Part). I’d like to merge the two sides.

Ok on the blueside try a simple data say use a string node and to the other inputs and try hit run and see what happens. I do not use that node coz theres no need for me to do so.

Interestingly, it made one file for each letter of the file name gave it (name started with Filter, had 6 files F.xls, i.xls, l.xls, t.xls, e.xls, and r.xls). Each file had one letter from the next word (building). Nooo idea how that happened.

Question: would using one excel file with a new sheet on each run be more beneficial to allow for a faster review of changes over time? I ask because a coworker recently saw me do similar and was shocked by the idea and simplified a workflow quite a bit (you mean I won’t have to copy/paste or reference between files!). If that’s a better method then using a time stamp in the sheet name should create a new sheet on each run. If not I think you can feed a timestamp in with a .xls extension and get a new excel file each time.

That’s pretty much what I’m trying to do: open a project, run the script a first time, have that first run create a new excel file and name the first sheet as the part name, and then each successive run (in the Dynamo Player) creates a new sheet in that same excel file. I got it to work on a previously created file, but I want the first run to create the new file.

My issue is user operability. Most of our field employees do not know the first thing about Dynamo, so I want to operate all of this from the player (create, write, append). I certainly don’t want it making a full new file every time I run the script. Only once when I run it for the first time for each project.

Hi Jacob,
Can you please explain or showcase node which can create or duplicate Sheet in the excel file.


If you feed in a name that doesn’t work it should create a new sheet. If that doesn’t work for you start a new thread as that’s a different topic (this is a new excel file).

solved this by creating multiple excel files instead of sheets to write data. Thanks…

1 Like