以前已经写了一个关于Process的DEMO了,但是,今天在测试的时候发现有些小问题:打开如(C:/Document and Settings)这样的文件夹中的Excel,Word,等文件时会出现问题.
我想应该是参数给的不对.所以做了如下调整:
string strFilePath=...;//file path
Process process=new Process();
process.StartInfo.FileName="Excel"; //or "WinWord"
process.StartInfo.Arguments="/""+strFilepath+"/"";
process.Start();
我想应该是参数给的不对.所以做了如下调整:
string strFilePath=...;//file path
Process process=new Process();
process.StartInfo.FileName="Excel"; //or "WinWord"
process.StartInfo.Arguments="/""+strFilepath+"/"";
process.Start();