複製並粘貼到記事本中的每個報價後,我有存儲在單元在工作表中現在額外的引號,當我從Excel
<tr onmouseover="this.style.backgroundColor='#74eb61';" onmouseout="this.style.backgroundColor='#e8e8e8';">
,當我從我複製並粘貼到記事本以下文本獲得額外的報價標誌後,每帖所以它變得像下面的字符串
<tr onmouseover=""this.style.backgroundColor='#74eb61';"" onmouseout=""this.style.backgroundColor='#e8e8e8';"">
您可以通過創建此:
複製這樣的文字:
<!-- CSS goes in the document HEAD or added to your external stylesheet -->
<style type="text/css">
table.hovertable {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 1px;
border-color: #999999;
border-collapse: collapse;
}
table.hovertable th {
background-color:#009fe3;
color:#FFFFFF;
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
}
table.hovertable tr {
background-color:#e8e8e8;
}
table.hovertable td {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
}
</style>
<!-- Table goes in the document BODY -->
<table class="hovertable">
<th colspan="4">Info Header</th>
<tr onmouseover="this.style.backgroundColor='#74eb61';" onmouseout="this.style.backgroundColor='#e8e8e8';">
<td>Item 1A</td><td>Item 1B</td><td>Item 1C</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#74eb61';" onmouseout="this.style.backgroundColor='#e8e8e8';">
<td>Item 2A</td><td>Item 2B</td><td>Item 2C</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#74eb61';" onmouseout="this.style.backgroundColor='#e8e8e8';">
<td>Item 3A</td><td>Item 3B</td><td>Item 3C</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#74eb61';" onmouseout="this.style.backgroundColor='#e8e8e8';">
<td>Item 4A</td><td>Item 4B</td><td>Item 4C</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#74eb61';" onmouseout="this.style.backgroundColor='#e8e8e8';">
<td>Item 5A</td><td>Item 5B</td><td>Item 5C</td>
</tr>
</table>
,並粘貼到任何單元格在Excel
,然後複製單元格的內容並粘貼記事本,你會發現額外的報價
刪除字符串Stystr = Replace(Trim(wh.Range(「A2」).text),「」「」,「」)中現有的引號 –
也在聲明中Dim Stystr,endHTb,StRTb ,tbstr,tbTag,ctb As String'只** ** ctb **被標註爲'String'類型。所有其他的都是變種。要將它們都標註爲'String'類型,請將'Dim Stystr as String,endHTb as String,StRTb as String ...'寫成' –
@ScottHoltzman nope我不認爲這樣做會起作用,因爲每個''''都被' ''''''''''替換爲'''',因此無法區分哪些需要替換 – newguy