This Add-In is used to produce a timesheet file with functionality to import your Google Timeline. The standard timesheet has options for start and end dates, day of week and default start, end and break times. The Google timeline options are start and end dates, UTC selection, daylight savings time parameters and title filter for timeline entries. There is also a right click shortcut to open your Google timeline to the date of the row that is currently selected. I used Terence Eden's blog post as a reference to write the procedure for downloading the Google Timeline files. Code review suggestions have been applied from this article.
Instructions for installation of VBA version
How to install the VBA version
Software | Dependency | Project |
---|---|---|
Microsoft Excel 2010 (or later) | Project | VBA |
Visual Basic for Applications | Code | VBA |
Extensible Markup Language (XML) | Ribbon | VBA, VSTO |
ScreenToGif | Read Me | VBA, VSTO |
Snagit | Read Me | VBA, VSTO |
Badges (Library, Custom, Star/Fork) | Read Me | VBA, VSTO |
Term | Meaning |
---|---|
COM | Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in 1993. It is used to enable inter-process communication and dynamic object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, ActiveX, COM+, DCOM, the Windows shell, DirectX, UMDF and Windows Runtime. |
VBA | Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6 and uses the Visual Basic Runtime Library. However, VBA code normally can only run within a host application, rather than as a standalone program. VBA can, however, control one application from another using OLE Automation. VBA can use, but not create, ActiveX/COM DLLs, and later versions add support for class modules. |
VSTO | Visual Studio Tools for Office (VSTO) is a set of development tools available in the form of a Visual Studio add-in (project templates) and a runtime that allows Microsoft Office 2003 and later versions of Office applications to host the .NET Framework Common Language Runtime (CLR) to expose their functionality via .NET. |
XML | Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.The design goals of XML emphasize simplicity, generality, and usability across the Internet. It is a textual data format with strong support via Unicode for different human languages. Although the design of XML focuses on documents, the language is widely used for the representation of arbitrary data structures such as those used in web services. |
KML | Keyhole Markup Language (KML) is an XML notation for expressing geographic annotation and visualization within Internet-based, two-dimensional maps and three-dimensional Earth browsers. KML was developed for use with Google Earth, which was originally named Keyhole Earth Viewer. |
This Excel ribbon is inserted after the “Home” tab when Excel opens. Listed below is the detailed functionality of this application and its components.
Insert rows of data into the active table with the following controls.
- Add days from the textbox values in the start and end dates in the "Date Options" group.
- Optional filter for day of week in "Day Options" group.
- Add timeline events filter from the start and end dates in the "Date Options" group.
- Downloads the .kml files per day from Google Timeline
- Imports each .kml file with optional filters for Title (using a delimited list in the settings) and day of week in "Day Options" group.
- This is the timezone offset for the stored date & time values in your Google Timeline.
- Uses a hidden sheet for the list of Timezones
- This will apply the daylight savings time to the Google Timeline import.
- This will apply the title filter from the settings to the Google Timeline import.
These date options will filter the selected table.
- The value that is used to filter inserts.
- The value that is used to filter inserts.
- This refers to the column name that date values get added to.
- These buttons allow the user to select a date from a calendar.
- Note: The calendar has a reference to Common Controls
- This button will refresh the list of column names in the combobox.
- This button will set the start and end dates in the textboxes to the current week.
- This button will set the start and end dates in the textboxes to the next 7 days using the maximum date from the selected table.
- This button will filter the selected table with the start and end dates from the textboxes.
- These checkboxes allow the user to limit the records inserted into the table by selected days
- The column name of the start time
- The column name of the end time
- The column name of the break time
- Refreshes the list of column name from the selected table
- The default value for the start time when inserted into the selected table
- The default value for the end time when inserted into the selected table
- The default value for the break time when inserted into the selected table
- Opens a webpage of the read me documentation
- Opens a page to create a new issue for the product
- Settings represent user preferences or valuable information the application needs to use.
- This opens the settings form. The settings are stored as custom properties and can be changed by double-clicking the item or using the update button.
![](/Excel-projects/Excel-Timesheet/raw/master/Images/ReadMe/vba.ribbon.settings.png)
- VBA Settings
- To add a new setting
ThisWorkbook.CustomDocumentProperties.Add _ Name:="App_ReleaseDate" _ , LinkToContent:=False _ , Type:=msoPropertyTypeDate _ , Value:="31-Jul-2017 1:05pm"
- To update a setting
ThisWorkbook.CustomDocumentProperties.Item("App_ReleaseDate").Value = "31-Jul-2017 1:05pm"
- To delete a setting
ThisWorkbook.CustomDocumentProperties.Item("App_ReleaseDate").Delete
- To add a new setting
This group's visibility is toggled with the F12 key
- View a list of errors in a hidden sheet
- Opens the Visual Basic editor
- Export the VBA and XML code for this file to the current directory
- The application name with the version
- The release date of the application
- The author’s name