Exporting Revit Schedules to Excel in one sheet

I found a script that will let me export schedules to excel into one excel document but they export into separate tabs. I’ve gotten as far as exporting them into one tab but they are writing over each other (when I run the file, I can see each schedule in the excel but they get overwritten by the next schedule thats loaded).
How can I export it so they load next to each other?

Hi @noeline03,

There must be a way to do this task using Dynamo.

But I would use a VBA to merge all sheets.

This VBA works for me.

Sub Combine()
    Dim J As Integer
    On Error Resume Next
    Sheets(1).Select
    Worksheets.Add
    Sheets(1).Name = "Combined"
    Sheets(2).Activate
    For J = 2 To Sheets.Count
        Sheets(J).Activate
        Range("A1").Select
        Selection.CurrentRegion.Select
        Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(5)
    Next
    Dim xWs As Worksheet
        Application.ScreenUpdating = False
        Application.DisplayAlerts = False
        For Each xWs In Application.ActiveWorkbook.Worksheets
            If xWs.Name <> "Combined" Then
                xWs.Delete
            End If
        Next
        Application.DisplayAlerts = True
        Application.ScreenUpdating = True
    End Sub

You might have to tweak the code a bit to get the desired output based on your panel templates.

How to use VBA in Excel

  1. Press Alt + F11 to go to VBA page
  2. From the Menu choose insert – Module
  3. Copy and paste the below VBA code in the code window.
  4. Press F5 to run the code.
1 Like