Ejemplo n.º 1
0
 public GSRepository(string applicationName, string pathToCredentials, string tableURL)
 {
     Scopes          = new string[] { SheetsService.Scope.Spreadsheets };
     ApplicationName = applicationName;
     SetUpCredential(pathToCredentials);
     SetUpDefaultService();
     CurrentSheetId   = null;
     CurrentSheetInfo = null;
     ChangeTable(tableURL);
 }
Ejemplo n.º 2
0
        public void SetUpSheetInfo()
        {
            if (CurrentSheetId is null)
            {
                throw new Exception("CurrentSheetId should be specified first");
            }
            var metadata = Service.Spreadsheets
                           .Get(CurrentSheetId)
                           .Execute();

            CurrentSheetInfo = new SheetInfo(metadata);
        }