Hi All,
I hope your all alright. I need help i would like to open an excel document by simply clicking a button. Any code or advise will be greatly appreciated.
kind regards. marvin
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 16, 2012, 11:21 AM
System.Diagnostics.Process.Start("somefile.xls"); // or .xlsx
Tarun BhalodiPosted Aug 17, 2012, 4:39 AM
if (objemail.ShowDialog(this)== DialogResult.OK)
{
try
{
DiskFileDestinationOptions diskOpts = ExportOptions.CreateDiskFileDestinationOptions();
ExportOptions exportOpts = new ExportOptions();
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
diskOpts.DiskFileName = Application.StartupPath + "\\Report.pdf;
exportOpts.ExportDestinationOptions = diskOpts;
CryRptDoc.Export(exportOpts);
sendmail();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
"like if ans accurate"