// получаем таблицу, в которой будем искать
var sourceTable = project.GoogleSpreadsheets["google_sheet"];
var collectedText = string.Empty;
var collectedLines = new HashSet<string>();
lock(SyncObjects.TableSyncer)
{
for(int i=0; i < sourceTable.RowCount; i++)
{
var cells = sourceTable.GetRow(i).ToArray();
if (string.IsNullOrWhiteSpace(cells[1].ToString()))
{
var line = cells[0].ToString().ToLower().Trim();
if (!collectedLines.Contains(line) && !string.IsNullOrWhiteSpace(line))
{
collectedLines.Add(line);
collectedText += line + Environment.NewLine;
}
}
}
}
if (string.IsNullOrWhiteSpace(collectedText))
{
throw new Exception("No data was collected from the table.");
}
return collectedText;