The script is as below:1
range = worksheet.get_Range(excelAPP.Cells[1, 1], excelAPP.Cells[1, colIndex]);
When i design this on VS 2010, it’s work fine, but i run on VS 2015, have an error:
Additional information: ‘object’ does not contain a definition for ‘get_Range’
Solution:1
range = worksheet.Range[worksheet.Cells[1, 1], worksheet.Cells[1, colIndex]];