could not find part of path
<p>i'm trying to convert a <code>DataTable</code> to an excel-file but at the time of creation of file it gives me error: <em>could not find part of path</em>.</p>

<pre><code>string strDirectorypath = HttpContext.Current.Server.MapPath("~/ExcelUpload/");
DateTime dtbatchtime = Convert.ToDateTime(strBatchProcesstime);
strBatchProcesstime = dtbatchtime.ToString("MM-dd-yyyy_hh_mm_ss");

string strFilename = "FailedExcel_" + strBatchProcesstime + ".csv";
string csvdownloadPath = Path.Combine(strDirectorypath, strFilename);
using (FileStream File_Stream = new FileStream(csvdownloadPath, FileMode.Create, FileAccess.Write, FileShare.ReadWrite))
{
    using (StreamWriter FileWriter = new StreamWriter(File_Stream))
    {
        FileWriter.BaseStream.Seek(0, SeekOrigin.End);
        string[] columns = { "Opportunity Name", "Property Id", "Error Type", "Error Message", "Time" };//set columns here as in the Excel Sheet.
        CreateColumns(FileWriter, columns);
        FileWriter.WriteLine();
        if (dtRecords.Rows.Count &gt; 0)
        {
            for (int i = 0; i &lt; dtRecords.Rows.Count; i++)
            {
                string[] values = { 
                    dtRecords.Rows[i]["OpportunityName"].ToString(), 
                    dtRecords.Rows[i]["PropertyId"].ToString(), 
                    dtRecords.Rows[i]["ErrorType"].ToString(), 
                    dtRecords.Rows[i]["ErrorMessage"].ToString(), 
                    dtRecords.Rows[i]["TimeStamp"].ToString() 
                };
                CreateColumns(FileWriter, values);
                FileWriter.WriteLine();
            }
        }

    }
}
</code></pre>
