亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

從Excel導出Excel列格式為十進制

從Excel導出Excel列格式為十進制

慕工程0101907 2019-12-06 15:37:51
嗨,我正在使用以下方法將數據庫導出到excel        Response.ClearContent();        Response.Buffer = true;        Response.AddHeader("content-disposition", "attachment; filename=" + FileName);        Response.ContentType = "application/vnd.ms-excel";        EnableViewState = false;        Response.Write("<style> TABLE { border:dotted 1px #999; } TH { border:dotted 1px #D5D5D5; text-align:center } TD { border:dotted 1px #D5D5D5; } </style>");        Response.Write("<table>");        Response.Write("<tr>");                  Response.Write("<th>Actual Estimated Price</th>");        Response.Write("<th>Aprroved Estimated Price </th>");        Response.Write("<th>Actual Price</th>");        Response.Write("<th>Aprroved Actual Price </th>");        Response.Write("<th>TransactionID </th>");                    Response.Write("<th>Created On</th>");        Response.Write("</tr>");        foreach (DataRow dr in dt.Rows)        {            Response.Write("<tr>");            Response.Write("<td>");            Response.Write(String.Format("{0:0.0#}", dr["EstimatedPriceTotal"].ToString()));            Response.Write("</td>");            Response.Write("<td>");            Response.Write(String.Format("{0:0.0#}", dr["ApprovedEstimatedPriceTotal"].ToString()));            Response.Write("</td>");            Response.Write("<td>");            Response.Write(String.Format("{0:0.0#}", dr["ActualPriceTotal"].ToString()));            Response.Write("</td>");            Response.Write("<td>");            Response.Write(String.Format("{0:0.0#}", dr["ApprovedActualPriceTotal"].ToString()));            Response.Write("</td>");            Response.Write("<td>");但我無法以excel格式導出excel中的實際估計價格,批準的估計價格該值顯示為5,而不是顯示5.00如何從C#端將Excel的某些列格式化為十進制格式
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 656 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號