Schedule export to excel

I’ve been perfecting my schedule-export-to-excel-dyn, but It still has some issues.

Issues:

  1. The exported data in excel is stored as text, I have to manually convert this to numbers. I read somewhere this has something to do with the difference in number-format between Revit and Excel. Revit uses 9,999.99 and Excel uses 9.999,99 - The solution is to change the format in Excel, but my office wants to use the 9.999,99 format in Excel so I need a different fix for this.

  2. I want to have a timestamp/date of the exported data in 1 specific cell in Excel. Right now I have to do it manually. When I tried before, the date overwrote the whole sheet resulting in all the data gone but only 1 cell with a date.


    This is what I tried: (I connected this to the same filepath as the rest of the graph)

  3. I noticed that if the amount of schedules/views in my Revit-files changes (more or less schedules/views) dynamo doesn’t remember the View that is selected so it jumps to another view… Is there anyway to fixate this?

  4. When I want to run the dynamo a second time on the same file, nothing happens. Dynamo is not overwriting the old data/information. I always have to provide a new empty excel AND give it a different name, and update the file path… Any fixes?

Other suggestions/perfections for the graph are always welcome!

I managed to solve issue 1 with String.Replace:

#2 set the overwrite to false.

1 Like

#3 get the view by ID or by name instead of using the drop down. I believe this is fixed in later Revit/Dynamo combinations.

1 Like

#4 this is likely a result of element binding. Close the .dyn, or use Dynamo Player to run your graph and you should be fine.

This thread should help clear up the specifics of element binding.

1 Like

Thanks, I changed it to this:

Thanks, that works!
Now I would still like to have the date on multiple sheets but in the same cel. Any suggestions?

I would set your excel file up to reference one date on all cases - a formula linking to the one cell that has the date should do.

If for some reason you can’t do that (think this through as there is very little reason you can’t), you could leverage List levels and lacing where the value to write is a single item, and the sheets, columns and the rest are multiple values.

Careful with multiple writes to the same file though - Excel isn’t a database but you are basically building one here, which could lead to file overwrite issues.

Thanks, everything is solved now!
This is how it looks right now:

I might be going too far, but would it be possible to have dynamo create a new excel file, but use an existing excel as a template (headers and other stuff)? And then also generate a filename that includes the date-stamp?
Is this remotely possible?

File.Copy would be a good thing to look at.

Here is an example on the forum: File.Copy node issues - #6 by Kulkul

Do you maybe know something about this node? Could I write multiple different sheets with it?
Capture24

Never used it. The OOTB node to write excel files supports multiple sheets though.