Beispiel #1
0
        static string[] LoadTimetableFromRemoteSheet(string sheetsID, string column)
        {
            column = column.ToUpper();
            var service = RemoteSheets.Auth();
            var result  = RemoteSheets.Read(service, sheetsID, "Лист1", $"{column}:{column}");

            return(result
                   .Select(v => v.Any() ? v[0].ToString() : "").ToArray());
        }
Beispiel #2
0
        static void Tests()
        {
            //var credential = Auth();
            //var service = CreateCalendarService(credential);

            //RequestSample(service);
            //CreateSampleEvent(service);

            //var calendar = CreateSampleCalendar(service, "Test");

            // EventCSVFormat.CreateCSVFile("test_calendar", new List<Event>() { event_});

            //SheetsManager.Foo();
            //Console.WriteLine(new DateTime().ToString("t", new System.Globalization.CultureInfo("en-US")));

            var service = RemoteSheets.Auth();
            var table   = RemoteSheets.Read(service, "1zcN4wBLvq_tnYrY7BfGjW2zBhcX_rET0DO6iBgEFZPw", "Лист2", "B2");

            CSVFormat.WriteCSVTable("table.csv", table);
        }