After using SaveFileDialog and buiding the filestream, I do Workbook.Save(filestream). After this the contents of the grid is exported and saved in the excel sheet. Our users however want the excel sheet to remain open? Even better solution would be to build the filestream and popup a prompt for the user to either Open or Save or Cancel the operation. How do I do it?
Is your application running in the browser? Whether it is out-of-browser or not will make a difference.
Thanks,
Its within a browser. I am exporting it from XamGrid.
SaveFileDialog dialog = new SaveFileDialog {"Excel 2003 files (.xls)|*.xls" , DefaultExt = "xls"
Filter =
};
bool? showDialog = dialog.ShowDialog();
if (showDialog == true )
{
using (Stream exportStream = dialog.OpenFile())
try {WorkbookFormat workbookFormat = WorkbookFormat.Excel97To2003;
Workbook dataWorkbook = new Workbook (workbookFormat);
. . .
// save the workbook
dataWorkbook.Save(exportStream);
}
Hello,
I spoke about this with one of our engineers. You only option is to send the XLS file back to the server, then in Silverlight or your HTML page, open a popup window pointing at the saved file on the server. This would prompt the end user to open the XLS.
I hope this helps...
OK, please post back if you run into question that we can assist with.
Thanks Francis, I will try and implement the same.