Soru Google calender (Takvim) ile Excel VBA iletişimi

seckinb

Altın Üye
Katılım
9 Aralık 2018
Mesajlar
363
Excel Vers. ve Dili
Excel 2019 - 32 bit TR
Altın Üyelik Bitiş Tarihi
10-06-2024
Merhaba,
Zor olduğunun farkındayım lakin, Google calender API kullanarak Excel VBA üzerinden bazı bilgileri aktarmak mümkün mü?

Farklı dilleri kullandıklarını düşünüyorum lakin bir userform ile oraya randevu girmek çok yararlı olacaktır.
 

Haluk

𐱅𐰇𐰼𐰚
Katılım
7 Temmuz 2004
Mesajlar
12,302
Excel Vers. ve Dili
64 Bit 2010 - İngilizce
+
Google Sheets
+
JScript
Altın Üyelik Bitiş Tarihi
Google Maps API ile veriler Excel'e alınabildiğine göre, bu isteğiniz de muhtemelen olur... Çalışıp, denemek lazım.

.
 

seckinb

Altın Üye
Katılım
9 Aralık 2018
Mesajlar
363
Excel Vers. ve Dili
Excel 2019 - 32 bit TR
Altın Üyelik Bitiş Tarihi
10-06-2024
Google Maps API ile veriler Excel'e alınabildiğine göre, bu isteğiniz de muhtemelen olur... Çalışıp, denemek lazım.

.

PHP:
' (Based of Analytics example)
' In Client setup, set BaseUrl and Scope for Calendar
Client.BaseUrl = "https://www.googleapis.com/calendar/v3/"
Auth.AddScope "calendar"

Public Type CalendarEvent
    Summary As String
    Location As String
    Attendees As Collection
    StartTime As Date
    EndTime As Date
End Type

' Insert event
' https://developers.google.com/google-apps/calendar/v3/reference/events/insert
Public Function InsertEvent(CalendarId As String, Event As CalendarEvent) As WebResponse
    Dim Request As New WebRequest
    Request.Resource = "calendars/{calendarId}/events"
    Request.Method = WebMethod.HttpPost
    
    Request.AddUrlSegment "calendarId", CalendarId
    
    Dim Body As New Dictionary
    Body.Add "summary", Event.Summary
    Body.Add "location", SummaryLocation
    Body.Add "attendees", Event.Attendees
    Body.Add "start", New Dictionary
    Body("start").Add "dateTime", Event.StartTime
    Body.Add "end", New Dictionary
    Body("end").Add "dateTime", Event.EndTime
    Set Request.Body = Body
    
    Set InsertEvent = Client.Execute(Request)
    
    ' https://developers.google.com/google-apps/calendar/recurringevents is a good example of what it should look like
    ' -> POST .../calendars/calendar-id/events
    '    {
    '       "summary": "...",
    '       "location": "...",
    '       "start": {
    '         "dateTime": "...T...Z (Date automatically converted to UTC"
    '         (shouldn't need timeZone with UTC dates, but Google may require it)
    '       },
    '       ...
    '    }
End Function

Public Sub Test
    Dim Event As CalendarEvent
    Event.Summary = "Staff Meeting"
    Event.Location = "Conference Room"
    Event.StartTime = DateValue("Jan. 1, 2015") + TimeValue("8:00 AM")
    Event.EndTime = DateAdd("h", 1, Event.StartTime)
    Set Event.Attendees = New Collection
    Event.Attendees.Add New Dictionary
    Event.Attendees(1).Add "email", "bob@company.com"
    Event.Attendees.Add New Dictionary
    Event.Attendees(2).Add "email", "sally@company.com"

    Dim Response As WebResponse
    Set Response = InsertEvent("StaffCalendar", Event))
    
    If Response.StatusCode = WebStatusCode.Ok Then
        ' Success!
    End If
End Sub
böyle bir kodu buldum lakin, modifiye edemediğim için çalıştıramadım.
 
Üst