First, you need to create a DBF or a cursor with specific fields in a specific format. As a minimum, you need two fields: Subject (that is, the title of the event) and Start Date. Fill the cursor with your data for those fields.
Next, export the contents of the cursor to a CSV file. If you don't know how to do that, check the VFP Help for the COPY TO command.
Finally, in Google Calendar, go to Settings (that's under the "gear" icon) / Calendars / Import Calendar / Choose File. Navigate to the CSV file that you just created.
The CSV file can contain other fields: Start Time, End Date, End Time, whether it is an all-day event, whether it is a private event, and a longer description of the event. It is important to get these in the right order and the right format.
For full details of the format and layout of the data, see
Thank you, Mike! That was extremely helpful. Albeit, this means importing the csv file from Google Calendar ... i.e., 7+ mouse clicks for the end-user.
... 7 clicks is certainly not bad if the csv file contains at least a couple line-rows of calendar entries. This may be the best I can hope for.
I suspect there is not a way to automate some (or all) of those 7 clicks in VFP-9 or Google Calendar ... or even Excel or a 3rd party.
... to directly export the csv file into Google Calendar from Visual Foxpro or such.
Again, utmost thanks and blessings for clearing the clouds and motivating me.
There is Google API to do such things as adding calendar appointments, but it's much more complicated than some clicks.
You can easily pave the way for users to work on their own Google calendar by simply adding a webbrowser control in some of your form and navigate to the universal "own calender" URL
The Google API would indeed enable you to aumtomate the whole process, but Olaf is right when he says that it is complicated. Unless you have a very large number of events to import, you would probably prefer to go with the interactive method.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
(assuming that URL is a constant)
Here the Google 'Import Calendar' button becomes immediately visible (to import the user's CSV file (CSV is easily generated by VFP routines))
The reason we'd desire google calendar (vs. Outlook) is that it seems to work nicely with iPhone/iWatch Calendar (my limited usage). iWatch is oft more 'burden than blessing' ... but a 'handy' iPhone/iWatch calendar might perhaps help make the iWatch less burdensome to tote around.
I'd also ponder if 'SendKeys' might help, like it does for Notepad, Word, Etc. But I'll spare you.
What the browser and google make of this automatically can change in the future, I wouldn't use the final URL the browser shows as better URL, it's not even a shortcut. It's something no working for everyone, my final URL will not include #settings-calendars_9, that's a name of one of your calendars only. I for example arrive at a different URL starting with
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.