Skip to main content
 首页 » 编程设计

c#之从按钮打开 excel 文件单击窗口窗体

2024年02月13日13bonelee

<分区>

private void btnOpenReport_Click(object sender, EventArgs e) 
{   
    if (System.IO.File.Exists(outputFilePath)) 
    { 
        Process.Start(new ProcessStartInfo("excel.exe", " /select, " + outputFilePath.Replace("\\\\", "\\"))); 
     } 
}