string path = row["FileAddress"].ToString().Trim();
Stream fs;
try
{
fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
}
catch (Exception e)
{
writeImport("Y", null, null, "未找到该文件", row["FileID"].ToString().Trim(), "");
continue;
}
DataTable dtnew = new DataTable();
if (row["FileType"].ToString().Trim() == ".xls")
{
dtnew = Common.ExcelHelper.RenderDataTableFromExcel(fs);
}
else
{
dtnew = Common.ExcelHelper.RenderDataTableFromExcel2007(fs);
}
if (dtnew != null && dtnew.Rows.Count > 0)
{}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////