Столкнулся с проблемой перевода HEX в TXT (например код C4EDE5EFF0EEEFE5F2F0EEE2F1EA в текст Днепропетровск) в экселевском файле. Поиски в интернете не дали результатов, а так как я не программист то прошу у вас помощи.
Столкнулся с проблемой перевода HEX в TXT (например код C4EDE5EFF0EEEFE5F2F0EEE2F1EA в текст Днепропетровск) в экселевском файле. Поиски в интернете не дали результатов, а так как я не программист то прошу у вас помощи.cOBA43
Function HexToText(HexText As String) 'http://bytes.com/topic/access/answers/754639-hex-text-ascii-conversion Dim varHex As Variant, intCounter As Integer Dim T, strString As String
varHex = Split(HexText, "0d0a")
For intCounter = LBound(varHex) To UBound(varHex) For T = 1 To Len(varHex(intCounter)) Step 2 strString = strString & Chr$(Val("&H" & Mid$(varHex(intCounter), T, 2))) Next varHex(intCounter) = strString strString = "" Next HexToText = Join(varHex, Chr(10)) End Function
Function HexToText(HexText As String) 'http://bytes.com/topic/access/answers/754639-hex-text-ascii-conversion Dim varHex As Variant, intCounter As Integer Dim T, strString As String
varHex = Split(HexText, "0d0a")
For intCounter = LBound(varHex) To UBound(varHex) For T = 1 To Len(varHex(intCounter)) Step 2 strString = strString & Chr$(Val("&H" & Mid$(varHex(intCounter), T, 2))) Next varHex(intCounter) = strString strString = "" Next HexToText = Join(varHex, Chr(10)) End Function
Function HexToText(HexText As String) 'http://bytes.com/topic/access/answers/754639-hex-text-ascii-conversion Dim varHex As Variant, intCounter As Integer Dim T, strString As String
varHex = Split(HexText, "0d0a")
For intCounter = LBound(varHex) To UBound(varHex) For T = 1 To Len(varHex(intCounter)) Step 2 strString = strString & Chr$(Val("&H" & Mid$(varHex(intCounter), T, 2))) Next varHex(intCounter) = strString strString = "" Next HexToText = Join(varHex, Chr(10)) End Function
Подскажите почему она не работает в Access от office 365
Function HexToText(HexText As String) 'http://bytes.com/topic/access/answers/754639-hex-text-ascii-conversion Dim varHex As Variant, intCounter As Integer Dim T, strString As String
varHex = Split(HexText, "0d0a")
For intCounter = LBound(varHex) To UBound(varHex) For T = 1 To Len(varHex(intCounter)) Step 2 strString = strString & Chr$(Val("&H" & Mid$(varHex(intCounter), T, 2))) Next varHex(intCounter) = strString strString = "" Next HexToText = Join(varHex, Chr(10)) End Function
Подскажите почему она не работает в Access от office 365cOBA43