Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.
Wed Dec 07, 2016 12:52 am
It seems there are two ways to get/set cell values: sheet.Range[row,col];//1-base index sheet.Rows[row].Cells[col];//0-based index I wander if there is any difference between these two methods?
Thanks for your inquiry. Here is a difference between them when getting/setting value. sheet.Rows[row].Cells[col], this can only get/set the value of existing cell, otherwise it will throw IndexOutOfRangeException. If there is any question, welcome to get it back to us.