We have finally got the right combinations of VSTO, Office and Visual APL and I have gone back through Jairo’s screen cast “Control Microsoft Excel with Visual APL and VSTO” posted 3/22/07.
My recreation of the demo went well but I have a little question. . . In the C# project Jairo included a ToDouble method to convert the object[,] value from the Excel range “ProductData” to
double[,] res.
In the ToDouble method there is a double loop for
(int i = 0; i < iRows; i++) and (int j = 0; j < iCols; i++)
When i and j are used to index the double[,] res the default index origin []IO = 0 is used.
When i and j are used to index the object[,] value the index origin seem to be 1 because we used (double)value[i+1, j+1].
What’s going on, why does get res indexed as res[ i , j ] and value as value[ i + 1, j + 1] ??