Click here to Skip to main content
15,915,765 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionFocusing a HTML button in Javascript.. Pin
Balagurunathan S3-Sep-07 21:47
Balagurunathan S3-Sep-07 21:47 
AnswerRe: Focusing a HTML button in Javascript.. Pin
Balagurunathan S3-Sep-07 21:54
Balagurunathan S3-Sep-07 21:54 
GeneralRe: Focusing a HTML button in Javascript.. Pin
mani_iips3-Sep-07 23:03
mani_iips3-Sep-07 23:03 
GeneralRe: Focusing a HTML button in Javascript.. Pin
Balagurunathan S3-Sep-07 23:39
Balagurunathan S3-Sep-07 23:39 
AnswerRe: Focusing a HTML button in Javascript.. Pin
Guffa3-Sep-07 23:12
Guffa3-Sep-07 23:12 
QuestionAsynchronous partial load of page content immediately after page load with ASP.NET AJAX server centric model Pin
Urs Enzler3-Sep-07 21:32
Urs Enzler3-Sep-07 21:32 
AnswerRe: TextArea in asp.net Pin
quilla.b3-Sep-07 21:37
quilla.b3-Sep-07 21:37 
QuestionExport To Excel - Macro not firing Pin
quilla.b3-Sep-07 21:11
quilla.b3-Sep-07 21:11 
Hi guys, recently we have migrated our server to use IIS 6.0 and ASP.NET 2.0

After running the web application, I found that after I have downloaded a report in Excel, the

macro attached to it no longer exists- as if it has not been attached to the Excel file.



Can you help me find the cause and solution to this issue?



Here is the code:


private void GetReport(IList regionList, IList subregionList, IList plantList, IList categoryList, IList platformList, IList measureList)<br />
		{<br />
			string VirtualPath = Request.Path.Substring(0,Request.Path.LastIndexOf("/")+1 );<br />
<br />
			Response.Charset = string.Empty; <br />
			StringWriter tw = new StringWriter();<br />
			HtmlTextWriter hw = new HtmlTextWriter(tw);<br />
			Response.ContentType = "application/vnd.ms-excel";<br />
			Response.AddHeader("Content-Disposition", "attachment;filename=" + "report.xls");<br />
<br />
			hw.Write("<html xmlns:x=\"urn:schemas-microsoft-com:office:excel\"><head>");<br />
			hw.Write("<meta http-equiv=Content-Type content=\"text/html;charset=windows-1252\">");<br />
			hw.Write("<meta name=ProgId content=Excel.Sheet>");<br />
			hw.Write("<meta name=Generator content=\"Microsoft Excel 10\">");<br />
			if(ddlYear.SelectedValue != "2006")<br />
				hw.Write("<link rel=Edit-Time-Data href=\"http://" + Request.Url.Host + VirtualPath +"macros/macro.mso\">");<br />
			else<br />
				hw.Write("<link rel=Edit-Time-Data href=\"http://" + Request.Url.Host + VirtualPath +"macros/macro_2006.mso\">");<br />
			hw.Write(GetStyles());<br />
			hw.Write("</head><body>");<br />
			GetTable(regionList, subregionList, plantList, categoryList, platformList, measureList).RenderControl(hw);<br />
			hw.Write("</body></html>");<br />
			Response.Write(tw.ToString());<br />
<br />
			hw.Close();<br />
			tw.Close();<br />
<br />
			Response.End();<br />
		}




Notes:

I displayed the path of the macros in the web page and it is correct.

So there is nothing wrong with the path.

I figured it must be something with ASP.NET 2.0. Maybe it does not recognize
the script for attaching macros to Excel anymore?
QuestionASP Error on local site : Expected Error ';' Pin
bryan paling3-Sep-07 21:07
bryan paling3-Sep-07 21:07 
JokeRe: ASP Error on local site : Expected Error ';' Pin
Sandeep Akhare3-Sep-07 21:22
Sandeep Akhare3-Sep-07 21:22 
GeneralRe: ASP Error on local site : Expected Error ';' Pin
bryan paling3-Sep-07 21:27
bryan paling3-Sep-07 21:27 
GeneralRe: ASP Error on local site : Expected Error ';' Pin
Sandeep Akhare3-Sep-07 22:07
Sandeep Akhare3-Sep-07 22:07 
AnswerRe: ASP Error on local site : Expected Error ';' Pin
John-ph3-Sep-07 21:35
John-ph3-Sep-07 21:35 
GeneralRe: ASP Error on local site : Expected Error ';' Pin
bryan paling3-Sep-07 21:45
bryan paling3-Sep-07 21:45 
AnswerRe: ASP Error on local site : Expected Error ';' Pin
Fred_Smith3-Sep-07 23:15
Fred_Smith3-Sep-07 23:15 
GeneralRe: ASP Error on local site : Expected Error ';' Pin
bryan paling3-Sep-07 23:23
bryan paling3-Sep-07 23:23 
GeneralRe: ASP Error on local site : Expected Error ';' Pin
Fred_Smith3-Sep-07 23:28
Fred_Smith3-Sep-07 23:28 
QuestionChanging the properties of control used in Web User Control from Web Form Pin
Dhyanga3-Sep-07 20:39
Dhyanga3-Sep-07 20:39 
AnswerRe: Changing the properties of control used in Web User Control from Web Form Pin
Sandeep Akhare3-Sep-07 20:54
Sandeep Akhare3-Sep-07 20:54 
AnswerRe: Changing the properties of control used in Web User Control from Web Form Pin
/randz3-Sep-07 20:59
/randz3-Sep-07 20:59 
GeneralRe: Changing the properties of control used in Web User Control from Web Form Pin
mani_iips3-Sep-07 23:07
mani_iips3-Sep-07 23:07 
GeneralRe: Changing the properties of control used in Web User Control from Web Form Pin
/randz3-Sep-07 23:24
/randz3-Sep-07 23:24 
QuestionDatalist inside datalist Pin
IamAmit3-Sep-07 20:33
IamAmit3-Sep-07 20:33 
AnswerRe: Datalist inside datalist Pin
rahul.net113-Sep-07 21:10
rahul.net113-Sep-07 21:10 
GeneralRe: Datalist inside datalist Pin
IamAmit3-Sep-07 21:19
IamAmit3-Sep-07 21:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.