I've been reading up on how to get my C# Windows Form to read from Google Sheets.
I think that I have a good grasp on how to read and write, but I'm incredibly lost as to how to get started.
I assume that the steps are as follows:
1. (Done) Get the API set up: https://developers.google.com/sheets/api/quickstart/dotnet
2. (Stuck here) Load up the sheet. I have no idea how to do this. I'm stuck on this. I've been unable to find a guide on the API page on how to actually load a sheet, and have been unable to find an updated code sample/guide online on how to accomplish the same thing.
3. Read/Write/Update values.
On this page: https://developers.google.com/sheets/api/guides/concepts at the bottom it seems to suggest using GET and then the sheet URL to get the sheet. However, when I use GET, I get this error: The type or namespace 'GET' could not be found.
Here's my code so far:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
GET https://sheets.googleapis.com/v4/spreadsheets/spreadsheetId?ranges=A1:C10&fields=properties.title,sheets(sheetProperties,data.rowData.values(effectiveValue,effectiveFormat))
}
}
GetCredential()method in your form - Panagiotis Kanavos