<?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 Re: Get special charaters in Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090587#M1224149</link>
    <description>&lt;P&gt;It needs to be differentiated which error occurred where to be able to react on them and/or to fetch them in beforehand.&lt;/P&gt;
&lt;P&gt;AFAIK there aren't many occasions in which vbs respectively the macro itself will struggle with (invalid) chars. Far more common are the errors caused from the environment - for example by trying to apply a filename with ?\... and so on because they are invalid from Windows storage point of view. Similar things are true for the Excel sheet names and/or the total lengths of the fullpath/sheetnames.&lt;/P&gt;
&lt;P&gt;Beside of this many special chars like -+ or a space could be used but then the values needs to be wrapped with an appropriate quoting - most often it will be double-quotes. If strings contain such chars and/or itself some quoting the extra outside-quote-wrapping you need often 3-4 double-quotes. This could be quite tricky but there are plenty of postings about the matter and even a trial and error approach isn't very hard - just comment the naming- and saving-parts and return them within a msgbox. If the strings look like as a hard-coded string - you should apply one just for testing - the entire logic should be working.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jul 2023 08:37:35 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2023-07-05T08:37:35Z</dc:date>
    <item>
      <title>Get special charaters in Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090125#M1224141</link>
      <description>&lt;P&gt;Hi Forum!&lt;/P&gt;
&lt;P&gt;I have a macro that copy data to excel, and set Item + description in the sheetsname and loop. Description&amp;nbsp; can contains special charater,like / and&amp;nbsp; spaces and the macro stops when it finds /,? etc. .&lt;/P&gt;
&lt;P&gt;How can i a allow to use them??&lt;/P&gt;
&lt;P&gt;1. set Vend = ActiveDocument.Fields("Product Short Description").GetPossibleValues&lt;/P&gt;
&lt;P&gt;2. ActiveDocument.Fields("Product Short Description").Select Vend.Item(j).Text&lt;/P&gt;
&lt;P&gt;3. appExcel.ActiveSheet.Name = ( Agno.Item(i).Text &amp;amp; " " &amp;amp; Vend.Item(j).Text )&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;I assume that you should use "" or '' somewhere in the string?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 04:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090125#M1224141</guid>
      <dc:creator>johnan</dc:creator>
      <dc:date>2023-07-04T04:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get special charaters in Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090287#M1224143</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Use double quotes to include the description text within the sheet name. This ensures that special characters are treated as part of the string and not interpreted as code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;In the above code, the &lt;CODE&gt;Replace&lt;/CODE&gt; function is used to replace the forward slash ("/") with a suitable character like a hyphen ("-"). You can modify the replacement character as per your requirement.&lt;/P&gt;
&lt;P&gt;By using the &lt;CODE&gt;Replace&lt;/CODE&gt; function, you can handle specific characters that might cause issues in the sheet name. This allows you to include special characters in the sheet name without interrupting the macro execution.&amp;nbsp;&lt;A href="https://www.mykfcexperience.website/" target="_self"&gt;&lt;FONT size="1 2 3 4 5 6 7" color="#FFFFFF"&gt;KFC Customer Satisfaction Survey&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 04:08:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090287#M1224143</guid>
      <dc:creator>Eloiseparkinson</dc:creator>
      <dc:date>2023-07-05T04:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get special charaters in Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090312#M1224144</link>
      <description>&lt;P&gt;VBS hasn't a direct feature to exclude certain chars. This means you would need an extra logic which looped through the chars of the item and checked it against a list of allowed chars. I remember having done it years ago within a function.&lt;/P&gt;
&lt;P&gt;Simpler as this would be you load this field twice and the second time with something like:&lt;/P&gt;
&lt;P&gt;keepchar(Field, '...') or the reversed ones per purgechar(Field, '...')&lt;/P&gt;
&lt;P&gt;and then grabbing this field within the macro.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 11:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090312#M1224144</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-07-04T11:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get special charaters in Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090507#M1224146</link>
      <description>&lt;P&gt;Hi, where do i use the double quotes in Macro?&lt;/P&gt;
&lt;P&gt;Sub SeleccLista&lt;/P&gt;
&lt;P&gt;ActiveDocument.ClearAll false&lt;/P&gt;
&lt;P&gt;set doc= ActiveDocument&lt;/P&gt;
&lt;P&gt;set docprop = doc.GetProperties &lt;BR /&gt;&lt;BR /&gt;directory = docprop.MyWorkingDirectory &lt;BR /&gt;&lt;BR /&gt;doc.GetApplication.Refresh &lt;BR /&gt;set appExcel = CreateObject("Excel.Application")&lt;/P&gt;
&lt;P&gt;appExcel.Visible = True &lt;BR /&gt;appExcel.WorkBooks.Add()&lt;/P&gt;
&lt;P&gt;set Agno =ActiveDocument.Fields("S4 artikelnummer").GetPossibleValues&lt;/P&gt;
&lt;P&gt;for i=0 to Agno.Count-1 &lt;BR /&gt;ActiveDocument.Fields("S4 artikelnummer").Select Agno.Item(i).Text &lt;BR /&gt;set Vend =ActiveDocument.Fields("Product Short Description").GetPossibleValues &lt;BR /&gt;For j=0 to Vend.Count-1 &lt;BR /&gt;ActiveDocument.Fields("Product Short Description").Select Vend.Item(j).Text &lt;BR /&gt;&lt;BR /&gt;Set Elemento1 = doc.GetSheetObject("CH02")&lt;/P&gt;
&lt;P&gt;appExcel.ActiveSheet.Name = ( Agno.Item(i).Text &amp;amp; " " &amp;amp; Vend.Item(j).Text ) &lt;BR /&gt;Elemento1.CopyTableToClipboard True &lt;BR /&gt;appExcel.ActiveSheet.Paste &lt;BR /&gt;appExcel.Sheets.Add &lt;BR /&gt;ActiveDocument.Fields("Product Short Description").Clear&lt;/P&gt;
&lt;P&gt;next&lt;BR /&gt;ActiveDocument.Fields("S4 artikelnummer").Clear&lt;/P&gt;
&lt;P&gt;Next&lt;BR /&gt;&lt;BR /&gt;appExcel.ActiveSheet.SaveAs (directory &amp;amp; "\Vendedores " &amp;amp; Hour(Now) &amp;amp; Minute(Now) &amp;amp; Second(Now) &amp;amp; ".XLS")&lt;BR /&gt;'appExcel.Application.Quit &lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 05:21:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090507#M1224146</guid>
      <dc:creator>johnan</dc:creator>
      <dc:date>2023-07-05T05:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get special charaters in Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090587#M1224149</link>
      <description>&lt;P&gt;It needs to be differentiated which error occurred where to be able to react on them and/or to fetch them in beforehand.&lt;/P&gt;
&lt;P&gt;AFAIK there aren't many occasions in which vbs respectively the macro itself will struggle with (invalid) chars. Far more common are the errors caused from the environment - for example by trying to apply a filename with ?\... and so on because they are invalid from Windows storage point of view. Similar things are true for the Excel sheet names and/or the total lengths of the fullpath/sheetnames.&lt;/P&gt;
&lt;P&gt;Beside of this many special chars like -+ or a space could be used but then the values needs to be wrapped with an appropriate quoting - most often it will be double-quotes. If strings contain such chars and/or itself some quoting the extra outside-quote-wrapping you need often 3-4 double-quotes. This could be quite tricky but there are plenty of postings about the matter and even a trial and error approach isn't very hard - just comment the naming- and saving-parts and return them within a msgbox. If the strings look like as a hard-coded string - you should apply one just for testing - the entire logic should be working.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 08:37:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-special-charaters-in-Macro/m-p/2090587#M1224149</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-07-05T08:37:35Z</dc:date>
    </item>
  </channel>
</rss>

