你能帮我改进代码吗?我收到了错误。文本框文本:" C:\ Users \ ASUS NBK \ Desktop \ csharptest.xls"
string fileName = textBox9.Text;
xlWorkBook.SaveAs(fileName , Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
xlWorkBook.Close(true, misValue, misValue);
xlApp.Quit();
当我这样说的时候效果很好:
xlWorkBook.SaveAs("C:\\Users\\ASUS NBK\\Desktop\\csharptest.xls", Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
xlWorkBook.Close(true, misValue, misValue);
xlApp.Quit();