Note that there are some explanatory texts on larger screens.

plurals
  1. POInserting special ascii characters into a file using VBA (excel)
    primarykey
    data
    text
    <p><br><br> I am fairly new to VBA, but not to coding in general. I have an Excel worksheet, part of which I need to export into a text file. However, to ensure the escape characters don't collide with anything written in the worksheet, and also to match up with how escape characters are handled in other (Java &amp; C) apps at our company, I would like to use the ascii character "<a href="http://www.theasciicode.com.ar/extended-ascii-code/lowercase-letter-thorn-ascii-code-231.html" rel="nofollow" title="click here to see what thorn is">thorn</a>". <br><br> Some languages that I know, like perl, will simply let you enter an escape character and the ascii number of the symbol. E.g., I could type "\231" in order to get "<a href="http://www.theasciicode.com.ar/extended-ascii-code/lowercase-letter-thorn-ascii-code-231.html" rel="nofollow" title="click here to see what thorn is">thorn</a>". It seems this is not supported in VBA. Or if it is, I am not sure how. <br><br> Lastly, below is a brief snippet of how I imagine I would implement the code, with just the key statements. If you have a better suggestion, or know why this wouldn't be the best way, please let me know.</p> <pre><code>Open sFullPath For Output As #1 </code></pre> <p>(... some code to capture the values to be written to the next line of the file ...)</p> <pre><code>sLine = Join(sValues, &lt;the thorn character&gt;) Print #1, sLine </code></pre> <p><br> The code above would be placed within a loop that would regenerate "sValues", the set of relevant cells in the next row to be printed to the text file. <br><br> Thanks so much! <br> Regards, <br> Mike</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload