예제 #1
0
        // Return range data as grid of strings, where each string represents content of the cell in the grid.
        internal static IList <IList <string> > GetStringsRangeDataSync(this SheetsService sheetsService, string spreadsheetId, string rangeString)
        {
            // Get response objects grid ..
            IList <IList <object> > cellsGridObjectsData = sheetsService.GetObjectsRangeDataSync(spreadsheetId, rangeString);
            // .. and translate it into the strings grid.
            IList <IList <string> > cellsGridStringsData = cellsGridObjectsData.Select <IList <object>, IList <string> >((objectsList) =>
            {
                return(objectsList.Select <object, string>((obj) =>
                {
                    return obj.ToString();
                }).ToList());
            }).ToList();


            // Return response string data grid
            return(cellsGridStringsData);
        }