¬Ý°_šÓ¹³¬Oªœ±µ¿é¥X csv/html ®æŠ¡Šš¬° Excel ÀÉ¡H
n¥Î¯Â€åŠrÀɀ芡¿é¥XœÐšÏ¥Î xml ®æŠ¡¡A§A¥i¥HŠb Excel ¥tŠs xml ®æŠ¡«á¡AšÌ®æŠ¡¿é¥X¡A©Îšì
©ó news:49D69938-7956-4979-BE8A-73678B9E34DC%40microsoft.com µoªí
€£Šn·N«ä §ÚšSŠ³»¡¥X€ñžû©úœTªº€èŠ¡
§Ú§Q¥Î€Ftreeview»Pxml°µ¥X€F¶¥ŒhªºÃö«Y
§Ú³oӥΊšÂæ€lšÓ°µªºìŠ]¬O ·QŠ³Šh¿ïªº®ÄªG
Š]¬°ì¥»¬O2Ódropdownlist(¥Ò¡B€A)
Šý§Ú§â³oӧŠ³¶¥ŒhªºÃö«Y
±µµÛšCÓtreeviewžÌ³£Š³ checkbox
·í§ÚÂI€U¥h«á ¥LŽN·|¶ÇȶišÓ
Šphttp://web.freeweb.net.tw/free/freeuser/wxvbbo/picture.doc
ŠÓ§Úªºreporting service·|¥h±µ¥LªºÈ ²£¥Í³øªí
šº²{Šb§Ú¥Žºâ¶ÇŠhÈ ·N«äŽN¬OÂI2Ó¥H€Wªºcheckbox
šº§Ú³oӧªœ±µ¶×¥Xexcel ŠÓ€£¥ÎŠA³z¹Lreporting service€W±ªºbutton
šº§Ú¥i¥HœT©w§Úªº²Ä2€äµ{Š¡(ŽN¬Oreporting service)Š³±µŠ¬šì§ÚªºcheckboxªºŒÆ¥Ø
©Ò¥H§Ú·Q»¡ ·|€£·|¬Oexcelªº¯S©Ê µLªkŠP®É¶×¥XŠh±i
¬G§Ú·Q±ÄžÌ±ŒW¥[sheetªº€èŠ¡ ŠpªG§Ú¿ï€F2Ó ŽNŠ³2Ósheet µM«áÈŽN¶ë¶i¥h
€£ªŸŠUŠì°ª€âªŸ¹D§Ú·N«ä ÁÂÁ§AÌ€F
šº§Úªº¬ÛÃö codeŠp€U
protected void Page_Load(object sender, EventArgs e)
{
string[] rptest = null;
string rppath = Request["report"].ToString().Trim();
rptest = rppath.Split(',');
Response.Write(rptest.Length);
for (int i = 0; i < rptest.Length ; i++)
{
ReportViewer1.ServerReport.ReportPath = "/test/" + rptest[i];
Microsoft.Reporting.WebForms.ReportParameter[] rp;
rp = new Microsoft.Reporting.WebForms.ReportParameter[8];
......
Microsoft.Reporting.WebForms.Warning[] warnings;
string[] streamids;
string mimeType;
string encoding;
string extension;
ReportViewer1.ServerReport.SetParameters(rp);
byte[] bytes = ReportViewer1.ServerReport.Render("Excel", null, out
mimeType, out encoding, out extension, out streamids, out warnings);
Response.Buffer = true;
Response.Clear();
Response.ContentType = mimeType;
Response.AddHeader("content-disposition", "attachment; filename=" +
rptest[i] + "." + extension);
Response.BinaryWrite(bytes);
Response.Flush();
}
}
"æ£æ£" šÓšç¡G
Post by ç皺§AŽNn¥ý»¡§A¥ŽºâŠpŠó¿é¥X¡C
šºÃä°Qœ×šìªº€£¥uŠ³ Automation ¡AÁÙ¥]§tšì database/html/xml ¡C
©ó news:65A45A13-7116-4320-8D76-DD2FDD7A5165%40microsoft.com µoªí
±zŠn
§Ú¬Ý€F žÌ±¬OÁ¿§Q¥ÎExcel.Applicationªº€èŠ¡
ŠýŠ]¬°§Ú³o€£¬O§Q¥Î³oÓªº€èŠ¡
€£ªŸ¹D¬O§_Š³¿ìªk ÁÂÁÂ
©Ò¥H·Q
"æ£æ£" šÓšç¡G
Post by ççhttp://forums.microsoft.com/MSDN-CHT/Search/Search.aspx?words=excel&lcid=31748&SiteID=14&searchscope=236&CSVUserID=&localechoice=31748
©ó news:5CE62C2E-5CF4-4BD2-B3DC-7491FB2264A6%40microsoft.com µoªí
ŠUŠìŠn
§Ú·Q±Nžê®Æ±qŒgšìexcel€€ µM«áŒg€J€£ŠPªºsheet
¥i¯ànŒg4šì5Ósheet...
·QœÐ°Ý §ÚžÓŠpŠó¥hŒg€J
ÁÂÁÂ
RSS 2.0 http://tlcheng.twbbs.org/News/rss2.aspx?Action=List&Newsgroup=microsoft.public.tw.dotnet.framework.aspnet