And I need to output the values as follows:
"API Docs Portal : op-api-docs"
"Big Ideas : op-bigideas"
"Education : op-education"
....
I've tried something but it doesn't works as expected...
for (var x = 1; x <= reportValue.GetLength(0); x++)
{
for (var y = 1; y <= reportValue.GetLength(1); y++)
{
if (reportValue[x, y] != null)
{
var id = reportValue[x, y];
var name = reportValue[x, y + 1];
var result = name + " : " + id;
}
}
}
Note:
This is how I get the reportValue array (using C# Interop):
var reportLast = ws.Range["A" + ws.Rows.Count].End(Excel.XlDirection.xlUp).Row;
var rngReport = (Excel.Range)ws.Range[ws.Cells[2, 1], ws.Cells[reportLast, 2]];
var reportValue = rngReport.Cells.Value;

0...reportValue[x, y + 1]looks pretty suspicious to me...