GoogleSheetHelper 1.0.0

dotnet add package GoogleSheetHelper --version 1.0.0
NuGet\Install-Package GoogleSheetHelper -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GoogleSheetHelper" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GoogleSheetHelper --version 1.0.0
#r "nuget: GoogleSheetHelper, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GoogleSheetHelper as a Cake Addin
#addin nuget:?package=GoogleSheetHelper&version=1.0.0

// Install GoogleSheetHelper as a Cake Tool
#tool nuget:?package=GoogleSheetHelper&version=1.0.0

GoogleSheetHelper

The GoogleSheet.Helper namespace was built because I struggled to read from a Google Sheet in C#, so I wanted to make it easier for other people to do this.

Features

GoogleSheet.Helper has one class named GoogleSheetHelper, the fields are as follows:

field Type Description Protection Level
SheetID string The ID of the Google Sheet you want to read from. private
ApplicationName string The name of the application you are using the Google Sheet in. private
credentials string The path (or filename) to your cridentials.json file private
c GoogleCredential The GoogleCredential object that is used to authenticate the Google Sheet. private
service SheetsService The SheetsService object that is used to read from the Google Sheet. private

The GoogleSheetHelper class has one constructor, the parameters are as follows, in order of how you input them:

Parameter Type Description
SheetID string The ID of the Google Sheet you want to read from.
credentialsPath string The path (or filename) to your cridentials.json file
ApplicationName string The name of the application you are using the Google Sheet in.

The GoogleSheetHelper class has several methods, the methods are as follows:

Method Return Type Parameters Description
WriteToCell bool string writeValue, string index Writes the writeValue to the given index, in A1 notation
SearchAtIndex string string searchFor, string indexRange Searches the index range until it finds the given string to searchFor
ReadFromCell string string index Reads the value from the given index, in A1 notation
InitializeSheetsService SheetsService none A private method to make a new SheetsService for the helper class to use

Usage

To use the GoogleSheetHelper class, you must first create a new GoogleSheetHelper object, like so (After Downloading the nuget package):

using GoogleSheet.Helper;

public class Program {

    public static void Main(string[] args) {
        GoogleSheetHelper helper = new GoogleSheetHelper("<YourSheetID>", "<Cridentials.jsonPath>", "<YourApplicationName>");

    }


}

Thanks for using my project, I hope it helps you as much as it helped me!

(c) 2023 - 2023, [Gammer0909]

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 179 5/6/2023