Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

RemoveHTML not working in QV API

Hi community,

I have some QV code from a demo document and I tried to copy a portion of it to a document on my system.  The code is RemoveHTML and it doesn't "turn blue" except for in the parent demo document.  Any ideas why this is or what I can do?

1 Solution

Accepted Solutions
Not applicable

Re: RemoveHTML not working in QV API

Press control M and make a macro with this code:

function RemoveHTML( strText )

          Dim RegEx

          Set RegEx = New RegExp

          RegEx.Pattern = "<[^>]*>"

          RegEx.Global = True

          RemoveHTML = RegEx.Replace(strText, " ")

End function

2 Replies
Not applicable

Re: RemoveHTML not working in QV API

Here's an example:

load



RemoveHTML(TextBetween(TextBetween(YahooKeyStatsText, 'Market Cap (intraday)',''),'<td class="yfnc_tabledata1">','</td>')) as [Valuation: Market Cap - RAW],

RemoveHTML(TextBetween(TextBetween(YahooKeyStatsText, 'Enterprise Value',''),'<td class="yfnc_tabledata1">','</td>')) as [Valuation: Enterprise Value - RAW],

What might the document have different to allow this?

Not applicable

Re: RemoveHTML not working in QV API

Press control M and make a macro with this code:

function RemoveHTML( strText )

          Dim RegEx

          Set RegEx = New RegExp

          RegEx.Pattern = "<[^>]*>"

          RegEx.Global = True

          RemoveHTML = RegEx.Replace(strText, " ")

End function