【发布时间】:2011-02-07 17:13:38
【问题描述】:
UnhandledException: System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(String fileName)
大家好,
我在尝试使用 Process.Start 打开 .csv 文件时在我正在测试的一台机器上遇到以下异常。我认为这是因为没有为这个盒子上的 .csv 文件设置文件关联。
那么你会如何避免这种情况呢?
强制 Process.Start 在记事本中打开? - 理想情况下应该在excel中打开,但是如果excel在那台计算机上不存在怎么办?
谢谢
【问题讨论】:
标签: c# exception-handling notepad process.start win32exception