Код: Выделить всё
string xlProjectRowNo = string.Empty;
string xlIoLibraryId = string.Empty;
string xlLinkId = string.Empty;
DataRow[] collPtArray = GlobalVars.projDS.Tables["dtProjectEntries"].Select("ID = " + projectEntriesId.ToString());
foreach (DataRow rowCollPt in collPtArray)
{
xlProjectRowNo = rowCollPt["ProjectRowNo"].ToString();
xlIoLibraryId = rowCollPt["IoLibraryId"].ToString();
xlLinkId = rowCollPt["LinkId"].ToString();
}
xlWorkSheet.Cells[1, 1] = xlProjectRowNo;
xlWorkSheet.Cells[1, 2] = xlIoLibraryId;
xlWorkSheet.Cells[1, 3] = xlLinkId;
Подробнее здесь: https://stackoverflow.com/questions/796 ... nd-interop