举例(Excel):
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "EXCEL文件(*.xlsx)|*.xlsx";
sfd.FileName = "默认文件名" ;
sfd.DefaultExt = "xlsx";//设置默认格式(可不设置)
sfd.AddExtension = true;
if (sfd.ShowDialog() == DialogResult.OK)
{
//获取保存路径url
string url = sfd.FileName.ToString();
}