savefiledialog を使用してグリッドビューを html ファイルとして保存するためのコードがあります。(savefiledialog を使用せずに) 特定のパスに保存したいのですが、どうすればいいですか?
ここに私のコードがあります:
SaveFileDialog dialog = new SaveFileDialog();
dialog.DefaultExt = "*.html";
dialog.Filter = "WORD Document (*.html)|*.html";
if (dialog.ShowDialog() == true)
{
RadDocument document = CreateDocument(rgvReportData);
document.LayoutMode = DocumentLayoutMode.Paged;
document.Measure(RadDocument.MAX_DOCUMENT_SIZE);
document.Arrange(new RectangleF(PointF.Empty, document.DesiredSize));
document.SectionDefaultPageMargin = new Telerik.Windows.Documents.Layout.Padding(2, 2, 2, 2);
document.SectionDefaultPageOrientation = PageOrientation.Landscape;
HtmlFormatProvider provider = new HtmlFormatProvider();
using (Stream output = dialog.OpenFile())
{
provider.Export(document, output);
}
}
savefiledialog を使用せずに保存するにはどうすればよいですか?