A C# console application that uploads Microsoft Excel and Word documents to Google Drive and opens them directly in Google Docs or Sheets. If a file with the same name already exists, it skips re-uploading and opens the existing file instead.
- Upload
.xlsx
,.csv
,.doc
, and.docx
files to Google Drive - Converts files to Google Sheets or Google Docs format
- Avoids duplicate uploads by checking existing file names
- Automatically opens the uploaded or existing file in Google Chrome
- Authenticates using Google OAuth2 with
credentials.json
- Cleans up stored token after each run
- .NET 6.0 or later
- Google Drive API enabled on your Google Cloud project
- OAuth 2.0 credentials (
credentials.json
) for a desktop app from the Google Cloud Console - Google Chrome installed on your system
-
Create project on Google Cloud Console
- Enable Google Drive API
- Create OAuth 2.0 credentials for Desktop App
- Download
credentials.json
-
Directory Structure
- Place
credentials.json
in:
C:\MoveToGoogle\Properties\credentials.json
- Place
-
Build the Project
- Clone this repo
- Open the solution in Visual Studio or your preferred IDE
- Restore NuGet packages:
Google.Apis.Auth
Google.Apis.Drive.v3
- Build the project
Notes: Be sure to update the packages as they are over 2 years old now, they still work just fine but in best practice you should update these.
You can set the .exe to your default for opening .xlsx,
.csv,
.doc, and
.docx` so it is automatic for end users on Windows devices. When they click the documents it will run that document directly into Google.