saveFileDialog saveFileDialog1=new saveFileDialog();
saveFileDialog1.InitialDirectory = Path.GetDirectoryName(strPartPath);
//设置文件类型
saveFileDialog1.Filter = "Excel 工作簿(*.xlsx)|*.xlsx|Excel 启动宏的工作簿(*.xlsm)|*.xlsm|Excel 97-2003工作簿(*.xls)|*.xls";
//saveFileDialog1.FilterIndex = 1;//设置文件类型显示
saveFileDialog1.FileName = "自己取个";//设置默认文件名
saveFileDialog1.RestoreDirectory = true;//保存对话框是否记忆上次打开的目录
saveFileDialog1.CheckPathExists = true;//检查目录
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
string strSaveFileLocation = saveFileDialog1.FileName;//文件路径
}