English 中文(简体)
VBA: 韩文/法文Excel(.xxxs)文件的新行和运输返回字符
原标题:VBA: newline and carriage return character for an Excel (.xlxs) file with Korean/French

在Excel文件(2010年美国版本和.xlxs扩展)中,

以前,我曾用英文的普通Excel文件 和以下代码, 写了一个成功完成这项工作的宏。

newStr = Replace(originalStr, newline/carriage return/both, replacementStr)

Newline/cavel return/both 将分别是 vbNewLine (Chr(10)), vbCr (Chr(13)), 或 vbCrLf。

我现在有一个韩语和法语的 Excel 文件, 而新行和 CR 字符似乎是别的东西。 我该如何找到它们实际上是什么, 即 < code> Chr () 或 VBA 常数, 并替换这些字符? 我需要删除所有的新行, 替换为 < code> lt; br/ & gt;

最佳回答

您能否选择一个相关的单元格,并检查包含的字符,例如:

s = Sheets("Sheet3").[e2]

For i = 1 To Len(s)
    If Asc(Mid(s, i, 1)) < 32 Then
        Debug.Print Asc(Mid(s, i, 1)); " -- "; i
    End If
Next
问题回答

暂无回答




相关问题
Handling no results for docmd.applyfilter

I have an Access app where I use search functionality. I have a TextBox and a Search Button on the form, and it does a wildcard search of whatever the user enters in the TextBox, and displays the ...

Outlook 2007 CommandBarControl.Execute won t work

I recently switched to Outlook 2007 and noticed that my VBA-macros won t work. I use the following code to open a new appointment-item (and fill it automatically). It worked perfect in Outlook 2003, ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

MS Access: list macro from VBA

I have to deal with a few macros (not VBA) in an inherited Access application. In order to document them, I would like to print or list the actions in those macros, but I am very dissatisfied by ...

热门标签