private void btnOpenReport_Click(object sender, EventArgs e)
{
if (System.IO.File.Exists(outputFilePath))
{
Process.Start(new ProcessStartInfo("excel.exe", " /select, " + outputFilePath.Replace("\\\\", "\\")));
}
}
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Probably you should just start the Excel file directly with property
UseShellExecute
totrue
, which is the default, and it will launch the default associated program, most likely Excel itself:Another matter is why you are doing that
Replace
, but that's probably off-topic here.