1. 0001더하는법 예) 0001 + 1 = 0002; string code = "K00001"; int num = Convert.ToInt32(code.ToString().Substring(1)) + 1; string ccc = string.Format("{0}{1:D5}", "k",num); 2.숫자형을 화폐형으로 int aaa = 54021532; string ccc = String.Format("{0:c}", aaa); 3.소숫점자리를 반환 int aaa = 1254; string ccc = String.Format("{0:f3}", aaa); //소숫점 3자리를 반환 4. (,) 표시하기 int str = 60000; string aaa = String.Format("{0:N0}",str);
protected void btnExcel_Click(object sender, EventArgs e) { //다운로드 되도록 헤더 설정 Response.Clear(); string fileName = "Excel.xls"; Response.AddHeader("content-disposition", "attachment;filename=" + fileName); Response.AddHeader("Expires", "0"); Response.ContentType = "application/vnd.xls"; System.IO.StringWriter stringWriter = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWriter = ne..