일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- GIT
- ubuntu
- PyQt
- node.js
- Unity
- ASP
- Linux
- IOS
- MS-SQL
- 날짜
- swift
- PyQt5
- tensorflow
- python
- 함수
- Excel
- 리눅스
- MySQL
- 라즈베리파이
- pandas
- javascript
- 맛집
- 유니티
- mssql
- port
- urllib
- 다이어트
- PER
- flutter
- sqlite
목록랭귀지/ASP (20)
아미(아름다운미소)
엑셀 다운로드시 셀속성을 변경해줘야 할 경우가 있습니다. 계좌번호 목록 같은경우 숫자 '0'으로 시작하는 경우 그리고 핸드폰번호 목록 같은경우에도 엑셀로 다운 받으면 숫자 '0'이 사라집니다. 이런 경우에는 셀 속성을 텍스트로 지정해주어야 하는데 그런 셀속성 변경하는 style값이 아래와 같은 것들이 있습니다. mso-number-format:\@ - text서식mso-number-format:"0\.000" - 소수점 3자리까지 서식 mso-number-format:"\#\,\#\#0\.000 - 소수점 3자리까지 & 숫자를 3자리씩 끊어서 [,]로 구분하는 서식 mso-number-format:""mm\/dd\yy" - 날짜서식 mso-number-format:":d\\-mmm\\-yyyy" - 날짜..
ASP 엑셀파일로 저장하기 Response.Buffer = True Response.ContentType = "application/vnd.ms-excel" Response.CacheControl = "public" Response.AddHeader "Content-disposition","attachment;filename=ASP엑셀예제_"&date()& ".xls"
한글이 깨지는 것은 대부분이 인코딩 문제 때문에 그렇습니다.ASP 상단에 4줄 써주고 UTF-8로 저장하시면 한글깨지는 문제로부터 자유로우실 겁니다.^^
asp에서 json 텍스트를 받아서 파싱 데이터 처리 asp 에서 json 형태의 텍스트를 받아서 처리하는 샘플입니다. 예를들어서 아래와 같은 json 텍스트를 여러레코드를 배열형태로 넘어왔을때, 이를 파싱해서 데이터를 처리할 수 있는 형태로 처리하도록 하겠습니다. [ {"name" : "홍길동", "age" : "25"}, {"name" : "선동렬", "age" : "32"}, {"name" : "박찬호", "age" : "48"} ] 먼저 json 모듈을 다운로드 받아서 적당한 위치에 파일을 위치하도록 합니다. Dim jsonText jsonText = jsonText & vbcrlf & "[" jsonText = jsonText & vbcrlf & " {""name"" : ""홍길동"", ""ag..
[asp] 유용함수 정리 '' 'HTML 태그제거 ' Function StripTags( htmlDoc ) Dim rex Set rex = New Regexp rex.Pattern= "]+>" rex.Global=True StripTags =rex.Replace(htmlDoc,"") End Function '=========================================================================== '함수명 : DB_IN_STR 'INPUT : cur_str ==> 검사할 문자열 '기능설명 : DB입력할때 ' 만 '' 로 교체 '===========================================================================..
마지막 문자열 구하기 Option Explicit Dim str : str = "100|5|0||2028|1090|서울특별시 강남구 삼성동" Response.write SearchAddress(str) Function SearchAddress(byRef paramStr) Dim ipos Dim strLen Dim Result '------------------------------------------------ ' 입력되는 인자의 전체 길이. '------------------------------------------------ strLen = Len(paramStr) '------------------------------------------------ ' 문자 '|' 마지막에 위치하는 자리 수 ..
- 케쉬설정 Sub Expires() Response.Buffer = True Response.Expires = 0 Response.AddHeader "Pragma", "no-cache" Response.AddHeader "cache-control", "no-store" End Sub - 트랜잭션 처리에 따른 스크립트처리 Sub Transaction_(Error_Count,Trans_script) If Error_Count = 0 Then DB.CommitTrans Response.Write "" Else DB.RollBackTrans Response.Write "" Call DBClose() Response.End End If End Sub - 필수 입력값 인지 체크 Function CheckEssen..
- 숫자 확인후 3자리마다 , 해주고 숫자가 아니면 문자 그대로 보내줌 Function ChkNumericToValue(CheckValue) If ISNumeric(CheckValue) Then ChkNumericToValue = FormatNumber(CheckValue,0) Else ChkNumericToValue = CheckValue End If End Function - Comma 뺀 숫자만 추출 Function ChkToMComma(CheckValue) dim CheckMomma If Len(CheckValue) > 0 Then CheckValue = replace(CheckValue, ",","") ChkToMComma = CheckValue Else ChkToMComma = "" End I..
- 문자열 바이트길이 가져오기 '-------------------------------------------------------- ' Function Name : GetLength ' Description : 문자열 바이트길이 가져오기 ' Example : GetLength("문자열") ' output : 6 ' -------------------------------------------------------- Function GetLength(strText) Dim nByteLen, nIdx, nLenIdx, nTextLenth If IsNull(strText) Then GetLength = 0 Exit Function End If nByteLen = 0 nTextLenth = Len(strTex..
- 윤달 체크 function get_month_lastday(year, mon) dim month_day(12) month_day(1) = 31 month_day(2) = 28 month_day(3) = 31 month_day(4) = 30 month_day(5) = 31 month_day(6) = 30 month_day(7) = 31 month_day(8) = 31 month_day(9) = 30 month_day(10) = 31 month_day(11) = 30 month_day(12) = 31 if mon = 2 and isdate(year & "-" & mon & "29") then get_month_lastday = 29 else get_month_lastday = month_day(mon) ..