Hi, Shakeel
- I define htmloutput in web.config
- using aspose.dll to generate workbook.
- finally, save as html and redirect to that htm file.
Any better approach to achieve html preview excel on web ?
If there’s any better way to do this, please provide some sample code.
My code looks like follows:
string sHtmlOutput = ConfigUtil.GetValue(“HtmlOutputFolder”, “HtmlOutput”);
string sMyGuid = Guid.NewGuid().ToString();
string sfilepath = string.Format(@"{0}{1}{2}", sHtmlOutput, _rptID, sMyGuid);
string swebfilepath = string.Format(@"/{0}/{1}/{2}", sHtmlOutput, _rptID, sMyGuid);
workbook.Save(System.Web.Hosting.HostingEnvironment.MapPath("~") + sfilepath, SaveFormat.Html);
Response.Redirect("~" + swebfilepath + “.htm”, false);
Regards,
agichen