We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Excel workbook open in broswer is not working

Thread ID:

Created:

Updated:

Platform:

Replies:

100280 Jul 21,2011 12:27 PM Jul 25,2011 08:29 AM ASP.NET Web Forms (Classic) 1
loading
Tags: XlsIO
Megumi Takahashi
Asked On July 21, 2011 12:27 PM

Hi,

I am trying to open an excel workbook on the current browser by using IWorkBook.SaveAs(...), but it always open the dialog box instead of opening the excel file. Is there any setting or something that I have to do before using this function?

-- the code

objExcelWorkbook.SaveAs(strFile & ".xls", objResponse, ExcelDownloadType.Open)

Thank you in advance.


Sridhar [Syncfusion]
Replied On July 25, 2011 08:29 AM

Hi Megumi,

Thank you very much for using Syncfusion products.

We have ExcelDownloadType.Open and ExcelDownloadType.PrombtDialog which are store the excel file in local host and we can open it using MSExcel. Currently, we dont have the support to open the file with in browser.

We are having the workaround that sainge the worksheet or workbook as an HTML and open it in the browser.

Please go through the following link for saving the workbook as an HTML.

http://help.syncfusion.com/ug_92/Reporting/XlsIO/ASP.NET/default.htm?turl=Documents%2Fsheetorganization.htm

Given below the code snippet used to save the workbook as an HTML and opening in the browser.

//Saving workbook
workbook.SaveAsHtml(Server.MapPath("Sample.html"), HtmlSaveOptions.Default);

//Opening with the browser
ClientScript.RegisterClientScriptBlock(this.GetType(), "open", "window.open('Sample.html','_blank');", true);


We ae implementing the Excel Viewer and it will be avilable in the next release and we can make use of it to open the workbook in an browser.

Please let us know if you require any further clarifications.

Thanks,
Sridhar.S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;