writing List <string> elements to excel
<p>I'm just using a simple code to write a list of string to excel as  following</p>

<pre><code>        Excel.Application excelApp = new Excel.Application();
        string myPath = Environment.CurrentDirectory + path + "\\reselts.xlsx";
        excelApp.Workbooks.Open(myPath);

        List &lt;string&gt; allterms = new List&lt;string&gt;(alltext.Split(' '));

         allterms= allterms.Distinct().ToList();
        allterms.RemoveAll(String.IsNullOrEmpty);

        for (int i = 1; i &lt; allterms.Count + 1; i++ )
        {

            excelApp.Cells[i, 1] = allterms[i];

        }
        excelApp.Visible = true;
</code></pre>

<p>But I got an error "index was out of range" ! what is wrong with my procedure ? can any help please ?</p>
