excel宏 汉字转拼音
答案:1 悬赏:50 手机版
解决时间 2021-03-24 04:41
- 提问者网友:蓝琪梦莎
- 2021-03-24 00:22
excel宏 汉字转拼音
最佳答案
- 五星知识达人网友:西风乍起
- 2021-03-24 01:36
在EXECL中,按ALT+F11,插入---模块 复制下列代码:
Functionhztopy(hzpy As String) As String
Dimhzstring As String, pystring As String
Dimhzpysum As Integer, hzi As Integer, hzpyhex As Integer
hzstring= Trim(hzpy)
hzpysum= Len(Trim(hzstring))
pystring=
Forhzi = 1 To hzpysum
hzpyhex = &H +Hex(Asc(Mid(hzstring, hzi, 1)))
Select Case hzpyhex
Case &HB0A1 To &HB0C4:pystring = pystring + A
Case &HB0C5 To &HB2C0:pystring = pystring + B
Case &HB2C1 To &HB4ED: pystring = pystring + C
Case &HB4EE To &HB6E9: pystring =pystring + D
Case &HB6EA To &HB7A1: pystring = pystring + E
Case &HB7A2 To &HB8C0:pystring = pystring + F
Case &HB8C1 To &HB9FD: pystring = pystring + G
Case &HB9FE To &HBBF6: pystring =pystring + H
Case &HBBF7 To &HBFA5: pystring =pystring + J
Case &HBFA6 To &HC0AB: pystring =pystring + K
Case &HC0AC To &HC2E7: pystring = pystring + L
Case &HC2E8 To &HC4C2: pystring = pystring + M
Case &HC4C3 To &HC5B5: pystring = pystring + N
Case &HC5B6 To &HC5BD: pystring =pystring + O
Case &HC5BE To &HC6D9: pystring =pystring + P
Case &HC6DA To &HC8BA: pystring =pystring + Q
Case &HC8BB To &HC8F5: pystring = pystring + R
Case &HC8F6 To &HCBF9: pystring = pystring......余下全文>>
Functionhztopy(hzpy As String) As String
Dimhzstring As String, pystring As String
Dimhzpysum As Integer, hzi As Integer, hzpyhex As Integer
hzstring= Trim(hzpy)
hzpysum= Len(Trim(hzstring))
pystring=
Forhzi = 1 To hzpysum
hzpyhex = &H +Hex(Asc(Mid(hzstring, hzi, 1)))
Select Case hzpyhex
Case &HB0A1 To &HB0C4:pystring = pystring + A
Case &HB0C5 To &HB2C0:pystring = pystring + B
Case &HB2C1 To &HB4ED: pystring = pystring + C
Case &HB4EE To &HB6E9: pystring =pystring + D
Case &HB6EA To &HB7A1: pystring = pystring + E
Case &HB7A2 To &HB8C0:pystring = pystring + F
Case &HB8C1 To &HB9FD: pystring = pystring + G
Case &HB9FE To &HBBF6: pystring =pystring + H
Case &HBBF7 To &HBFA5: pystring =pystring + J
Case &HBFA6 To &HC0AB: pystring =pystring + K
Case &HC0AC To &HC2E7: pystring = pystring + L
Case &HC2E8 To &HC4C2: pystring = pystring + M
Case &HC4C3 To &HC5B5: pystring = pystring + N
Case &HC5B6 To &HC5BD: pystring =pystring + O
Case &HC5BE To &HC6D9: pystring =pystring + P
Case &HC6DA To &HC8BA: pystring =pystring + Q
Case &HC8BB To &HC8F5: pystring = pystring + R
Case &HC8F6 To &HCBF9: pystring = pystring......余下全文>>
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯