How to Export Outlook Calendar to Excel?

Download Outlook Calendar Appointments to Excel using one of these 2 methods.

  1. Outlook Calendar Export to CSV
  2. Outlook VBA to export Calendar to Excel

In the first method, you will get a comma separated value file, with all the appointment details exported. This file can be opened in Excel app to view the content.

Outlook VBA to Export Calendar to Excel

Well. Here, there is not limitation with options. With the Outlook VBA, we will be able to control what needs to be exported. Any field, any date range, any Calendar item. Its all possible.

Just copy paste the below code to Outlook VB editor, by pressing Alt + F11. Press F5 to execute this code as how it is done with Excel vba.

Note: Include ‘Microsoft Excel Object Library’ from Tools -> References

Private Sub Outlook_Vba_Get_Calendar_Item_Appoinments()
    Dim oWorkbook As Workbook, Calendar_To_Excel_File As String
    Dim oOutlook_Calendar As Outlook.Folder, oCalendar_Items As Outlook.Items
    Dim oCalendarAppointment As Outlook.AppointmentItem
    Dim iRow As Double

    iRow = 1

    'Change path of the Target File name if required
    Calendar_To_Excel_File = "D:\Sample23434.xlsx"
    'Check if Output File already exists
    If VBA.Dir(Calendar_To_Excel_File) = "" Then
        'To Create New Workbook
        Set oWorkbook = Workbooks.Add
        oWorkbook.SaveAs Calendar_To_Excel_File
    Else
        'To Refer Already Created Workbook
        Set oWorkbook = Workbooks.Open(Calendar_To_Excel_File)
    End If
    
    'Get object reference for Outlook Calendar folder
    Set oOutlook_Calendar = Outlook.Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar)
    Set oCalendar_Items = oOutlook_Calendar.Items
    
    'Loop Thru Each Items in Outlook Calendar
    For Each oCalendarAppointment In oCalendar_Items
        oWorkbook.Sheets(1).Cells(iRow, 1) = oOutlook_Calendar.FolderPath
        oWorkbook.Sheets(1).Cells(iRow, 2) = oCalendarAppointment.Start
        oWorkbook.Sheets(1).Cells(iRow, 3) = oCalendarAppointment.End
        oWorkbook.Sheets(1).Cells(iRow, 4) = oCalendarAppointment.Subject
        oWorkbook.Sheets(1).Cells(iRow, 5) = oCalendarAppointment.Location
        oWorkbook.Sheets(1).Cells(iRow, 6) = oCalendarAppointment.Duration
        oWorkbook.Sheets(1).Cells(iRow, 7) = oCalendarAppointment.Size
        'oWorkbook.Sheets(1).Cells(irow, 8) = oCalendarAppointment.Body
        iRow = iRow + 1
    Next

    'Save Excel Workbook With Calendar Appointments
    oWorkbook.Save
    oWorkbook.Close False  'Close Workbook without any Warning
    MsgBox "Outlook Calendar Appointments Downloaded To:" & Calendar_To_Excel_File

End Sub

Once the code is executed, all the calendar items are exported to Excel file output.

This can be used to maintain all the appointments in one place & it is easy to refer, sort in Excel file rather than in Outlook Calendar.

Export Outlook Calendar Appointments to Excel or CSV

To extract all the calendar appointments from Outlook 2010 or above.

  1. Open Microsoft Outlook app.
  2. Open Calendar section.
  3. Choose File Menu -> Open & Export.
  4. Click Import/Export -> ‘Export to a file’ -> ‘Comma Separated Values’.
  5. Select which Calendar to export & Click Next.
  6. Type Output File name & Mapping for output fields.
  7. Click Finish & then Date range.

After ‘Finish’ button is clicked, Outlook will ask additional input asking for date range. The Outlook Calendar appointments falling under this date range will only be selected to download.

Once the process is completed, open the exported calendar file in Excel & verify the output.

Leave a Reply