I have an array and I need to put the elements in one row, every element of the array should be in a different cell.
foreach (var cell in range.Cells())
{
int index = 0;
cell.Value = arrayCompany[index];
index++;
if (index == count)
{
break;
}
}
My array has 10 elements and the excel file generates one row but in all 10columns, cell value is the last element of the array. I want each element to be in a different column. A1=arrayCompany[0],B1=arrayCompany[1] ... 10thcolumn = arrayCompany[9]