Dynamo - Writting Mutiple Excel file from same data source

Hi, everyone, hope you guys are doing well.
I meet a challenge when I want to export multiple excel files from the same data source.
As we know, the DataExportExcel Node can only write ONE excel sheet each time.

I’m hoping each time I click the run, dynamo can write a new excel, run a second time, second excel sheet, and so on, each sheet time can name as the current time. (Or whatever the sheet name).
I’m thinking about use python, but I don’t know how to write this code.

Thanks for much for the help!

Do you want to write the same data to each one, or different data to different files?

Hi, SeanP,

I want to write different data to different excel files. But with the same workflow.

Thank you so much for your time!!

This example shows opening the 5 files in the test folder and cycling the list to add the data to each one of them using the “Count” worksheet.

Just make sure you FilePath list and the Data list are the same hierarchy and length.

1 Like

Dear SeanP,

Did you create these five excel files 1,2,3,4,5 by yourself?
I was thinking about how to create a new excel with python in dynamo environment, I try to use xlsxwriter, but it doesn’t work.

It there any way to create a new excel file and then write the data to excel each time I run dynamo?
I’m thinking to update the data each time run the script, the reason why I need history excel file is that I want to put it into Power BI to show the history data.
Let’s say, today is 7/29, I open this script to run dynamo, I get the data 1 in excel 1
tomorrow is 7/30, I run, get data 2 in excel 2
I want to keep both excel 1 and 3 and so on in a folder, and then power bi can read a folder as database.
The things is, how to achieve each time run dynamo, create a new excel file, not manually create a blank excel file and then push the data on it.

Thank you so much for your time!!