FileStream BookStream = new FileStream(saveFileDialog.FileName.ToString(), FileMode.Create, FileAccess.Write);//定义文件流
book.Write(BookStream);//将工作薄写入文件流
BookStream.Seek(0, SeekOrigin.Begin); //输出之前调用Seek(偏移量,游标位置)方法:获取文件流的长度
BookStream.Close();
MessageBox.Show("导出保存成功!");