|
|
@@ -24,7 +24,7 @@ namespace UAS_MES_NEW.DataOperate
|
|
|
MemoryStream ms;
|
|
|
ms = DataTableToExcel(dt);
|
|
|
//以系统当前时间命名文件,FileMode.Create表示创建文件,FileAccess.Write表示拥有写的权限
|
|
|
- string filePath = @FolderPath + "\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls";
|
|
|
+ string filePath = FolderPath;
|
|
|
FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
|
|
|
byte[] data = ms.ToArray();
|
|
|
fs.Write(data, 0, data.Length);
|