Recording data on excel on each row - instead of data getting refreshed in one spot

hello,

I have a script where if I move around a point in Revit, Dynamo will give me a appropriate isovist value.
However I want to get the sum of all the results and thought exporting all those data on excel would be the only way. for example (1st = 100 , 2nd = 130, 3rd = 150 -> sum = 380). if someone knows how to do it without excel that would be awesome too.

however, im having a hard time making the data get recorded on each row. instead, it is keep refreshing on the same spot.

any help? thanks!


I’ve gotten around this by reading the excel file, and the adding the new data to the of the old with add to end of list node, before writing it to the same excel.

There’s probably better methods, but thats how I corced it to work

Came here to say this. This is the most straightforward way to do it.

I’m glad to hear that, cause i thought I was making it work off the top of my head without checking the best way on the forums.

but on that point, I kind of avoid using the excel ability on dynamo as much as I can, except in cases where i want to record data to analyze a trend or record data so I can shove under my design team’s noses and say “Tell me again, that you’ve done it correctly and followed my instructions to the T, please?” hahaha

There may be “better” ways to do it, but I think reading the file first is totally valid and an easy and straightforward method for most people to understand and implement. I agree that it’s best not to use Excel as a crutch. I mainly use it for reports.

Write the data to excel after you get the last used row using the DS like this


DSCore.List.Count(Data.ImportExcel(filePath, sheetName, false, true));

1 Like

Similar idea, but maybe a few less nodes.

Yup, with an advantage that it would preserve the formatted cells!

1 Like