Skip to content

Handles uploading of Microsoft file types to google drive for editting for those who do not have Office 365 licenses.

Notifications You must be signed in to change notification settings

KodyPrograms/Microsoft-To-Google-Drive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft To Google Drive

A C# console app that uploads Microsoft Office files to Google Drive, converts them into Google Docs/Sheets, and opens them in Chrome. If a file with the same name already exists, it skips the upload and opens the existing file instead. Built as a lightweight automation utility. Feel free to critique it.

Live app

This is a local-only demo (desktop tool).

Running locally

Things you need

  • Windows
  • Visual Studio (or MSBuild)
  • .NET Framework 4.5.1+
  • Google Chrome

The easy way

Open the solution and run it.

Microsoft To Google Drive.sln

Press Start (F5) to build and run.

The harder way

Build from the command line (if MSBuild is installed):

msbuild "Microsoft To Google Drive.sln" /p:Configuration=Release

Run the exe from:

Microsoft To Google Drive/bin/Release/Microsoft To Google Drive.exe

Google API setup

  1. Create a Google Cloud project and enable the Google Drive API.
  2. Create OAuth 2.0 Desktop App credentials and download credentials.json.
  3. Place the file here (path is hardcoded in Program.cs):
C:\MoveToGoogle\Properties\credentials.json

A token cache is created at:

C:\MoveToGoogle\Properties\token.json

The app deletes this token folder at the end of each run.

Usage

The app expects a file path as the first CLI argument, for example:

"C:\path\to\file.xlsx"

Typical usage is to set the app as the default handler for:

  • .xlsx
  • .csv
  • .doc
  • .docx

When a user opens a file, it uploads/converts it and opens the Google Docs/Sheets link in Chrome.

Supported file types

  • Excel: .xlsx, .csv → Google Sheets
  • Word: .doc, .docx → Google Docs

How it works

  1. Reads the file path passed in via args.
  2. Checks Google Drive for a matching name.
  3. If found, opens the existing doc in Chrome.
  4. If not, uploads, converts, and opens the new doc.

Notes

  • Chrome is launched from C:\Program Files\Google\Chrome\Application\chrome.exe (or x86 fallback).
  • The upload uses Drive API v3 with OAuth2.
  • NuGet packages in packages.config are older; upgrading is recommended.

Enjoy!

About

Handles uploading of Microsoft file types to google drive for editting for those who do not have Office 365 licenses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages