private void InitialiseRemoteTable() { try { SheetsInterface.Authenticate(); SheetsInterface.InitialiseService(); RetrieveReponseSpreadsheet(); } catch (Exception e) { Console.WriteLine("Er is iets goed misgegaan:\n" + e.Message); } }
public void RetrieveReponseSpreadsheet() { const string id = "1itpt9-c7o7yLqDk83yLpHppVxSceSOsT2xmSGMg6hT4"; const string range = "Sheet1!A:B"; var values = SheetsInterface.GetValues(id, range); remoteResponseTable.Clear(); for (int y = 0; y < values.Count; y++) { var entry = values[y]; if (entry.Count != 2) { continue; } remoteResponseTable.Add(values[y][0].ToString(), values[y][1].ToString()); Console.WriteLine(values[y][0].ToString() + " - " + values[y][1].ToString()); } }