How to save and close excel worksheet
<p>how to close excel work sheet,i want save only excel worksheet not open,this code save and open excel worksheet how to avoid that</p>

<pre><code>for (int h = 0; h &lt; Dtb.Rows.Count; h++)
{
    for (int j = 0; j &lt; Dtb.Columns.Count; j++)//dataGridView1.Columns.Count
    {
        wksht.Cells[h + 1, j + 1] = Dtb.Rows[h].ItemArray[j];        
    }
}

wksht.SaveAs("C:\\Barcodes\\New\\" + BatchCode + " " + Date + "_" + k + ".xlsx");
</code></pre>