<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Resolving an Excel Non-Breaking Space using SubField() in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Resolving-an-Excel-Non-Breaking-Space-using-SubField/m-p/1612970#M63290</link>
    <description>&lt;P&gt;I am working with a large set of Excel files that I am importing into Qlik Sense. One of the fields that I need to import comes from a long text string. The string had a set of document numbers embedded in the string. Using the Index() and Mid() functions, I was able to locate and extract the document number. Since the document number could vary in length, I attempted to use the SubField() function to pull the document number out, by delimiting on the &amp;lt;space&amp;gt; that followed the document number.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: SubField(Mid(Index("Account Description", 'N01'), 15), ' ', 1) AS DocumentNo&lt;/P&gt;&lt;P&gt;In most cases, this worked perfectly. However, in reviewing the results, I would get things like:&lt;/P&gt;&lt;P&gt;N011234XYZ12 01 - which still includes a space in the document number. After reviewing the source data, I discovered that in some cases, the data (which had initially been stored in SharePoint) included a "Non-Breaking Space"&amp;nbsp; (nbsp) (&lt;A href="https://en.wikipedia.org/wiki/Non-breaking_space" target="_blank"&gt;https://en.wikipedia.org/wiki/Non-breaking_space&lt;/A&gt;) .&amp;nbsp; The excel files where this comes from cannot be edited, so the&amp;nbsp; modification had to be done in the Qlik Sense script editor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;After researching this issue, my solution was to add an additional SubField() function, by including the "invisible" nbsp. To do so, my resulting solution looked like:&lt;/P&gt;&lt;P&gt;SubField(SubField(Mid(Index("Account Description", 'N01'), 15), ' ', 1), ' ', 1) AS DocumentNo&lt;/P&gt;&lt;P&gt;Where in the second ' ' I typed &amp;lt;ALT+255&amp;gt;&amp;nbsp; (Hold the ALT key down, and type 255). The result returned just the document number, without the extra 'space' and characters -&amp;nbsp;N011234XYZ12.&lt;/P&gt;&lt;P&gt;Hopefully, this will save someone some time if you come across this problem!&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 08:04:16 GMT</pubDate>
    <dc:creator>stevegpage1</dc:creator>
    <dc:date>2021-04-02T08:04:16Z</dc:date>
    <item>
      <title>Resolving an Excel Non-Breaking Space using SubField()</title>
      <link>https://community.qlik.com/t5/App-Development/Resolving-an-Excel-Non-Breaking-Space-using-SubField/m-p/1612970#M63290</link>
      <description>&lt;P&gt;I am working with a large set of Excel files that I am importing into Qlik Sense. One of the fields that I need to import comes from a long text string. The string had a set of document numbers embedded in the string. Using the Index() and Mid() functions, I was able to locate and extract the document number. Since the document number could vary in length, I attempted to use the SubField() function to pull the document number out, by delimiting on the &amp;lt;space&amp;gt; that followed the document number.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: SubField(Mid(Index("Account Description", 'N01'), 15), ' ', 1) AS DocumentNo&lt;/P&gt;&lt;P&gt;In most cases, this worked perfectly. However, in reviewing the results, I would get things like:&lt;/P&gt;&lt;P&gt;N011234XYZ12 01 - which still includes a space in the document number. After reviewing the source data, I discovered that in some cases, the data (which had initially been stored in SharePoint) included a "Non-Breaking Space"&amp;nbsp; (nbsp) (&lt;A href="https://en.wikipedia.org/wiki/Non-breaking_space" target="_blank"&gt;https://en.wikipedia.org/wiki/Non-breaking_space&lt;/A&gt;) .&amp;nbsp; The excel files where this comes from cannot be edited, so the&amp;nbsp; modification had to be done in the Qlik Sense script editor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;After researching this issue, my solution was to add an additional SubField() function, by including the "invisible" nbsp. To do so, my resulting solution looked like:&lt;/P&gt;&lt;P&gt;SubField(SubField(Mid(Index("Account Description", 'N01'), 15), ' ', 1), ' ', 1) AS DocumentNo&lt;/P&gt;&lt;P&gt;Where in the second ' ' I typed &amp;lt;ALT+255&amp;gt;&amp;nbsp; (Hold the ALT key down, and type 255). The result returned just the document number, without the extra 'space' and characters -&amp;nbsp;N011234XYZ12.&lt;/P&gt;&lt;P&gt;Hopefully, this will save someone some time if you come across this problem!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 08:04:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Resolving-an-Excel-Non-Breaking-Space-using-SubField/m-p/1612970#M63290</guid>
      <dc:creator>stevegpage1</dc:creator>
      <dc:date>2021-04-02T08:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Resolving an Excel Non-Breaking Space using SubField()</title>
      <link>https://community.qlik.com/t5/App-Development/Resolving-an-Excel-Non-Breaking-Space-using-SubField/m-p/1612988#M63291</link>
      <description>&lt;P&gt;Solution:&lt;/P&gt;&lt;P&gt;Add a SubField() function, by including the "invisible" nbsp.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: SubField(SubField(Mid(Index("Account Description", 'N01'), 15), ' ', 1), ' ', 1) AS DocumentNo&lt;/P&gt;&lt;P&gt;Where in the second ' ' I typed &amp;lt;ALT+255&amp;gt;&amp;nbsp; (Hold the ALT key down, and type 255).&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 16:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Resolving-an-Excel-Non-Breaking-Space-using-SubField/m-p/1612988#M63291</guid>
      <dc:creator>stevegpage1</dc:creator>
      <dc:date>2019-08-15T16:03:50Z</dc:date>
    </item>
  </channel>
</rss>

