4 Messages
Digest #3436
Messages
Thu Jun 18, 2015 10:20 am (PDT) . Posted by:
jharlan
There is a URL with a string of text that I want to conduct a word count on.
The text is between <DIV class="description>Here are the words with <b>additional</b> tag formatting that I'd like removed.</DIV>
I use the formula,
=smfstrExtr(RCHGetWebData("www.someurl.com/place"),"class="description">","</div")
But nothing is returned. I'm not sure why, but I think the problem is with the quotation marks around the word description.
Then once the text is extracted, or concomitantly, I could perform word count, using,
=IF(LEN(TRIM(T2))=0,0,LEN(TRIM(T2))-LEN(SUBSTITUTE(T2," ",""))+1)
Where the T2 cell holds the text. But I'd really like it all to be in one formula, if possible.
Any thoughts?
Thanks,
The text is between <DIV class="
I use the formula,
=smfstrExtr(
But nothing is returned. I'm not sure why, but I think the problem is with the quotation marks around the word description.
Then once the text is extracted, or concomitantly, I could perform word count, using,
=IF(LEN(TRIM(
Where the T2 cell holds the text. But I'd really like it all to be in one formula, if possible.
Any thoughts?
Thanks,
Thu Jun 18, 2015 1:01 pm (PDT) . Posted by:
"Randy Harmelink" rharmelink
Here's your formula corrected:
=smfStrExtr(RCHGetWebData($D$4),"class=""description"">","</DIV")
A simpler version:
=smfGetTagContent($D$4,"div",-1,"class=""description"">")
But for a word count, you'd need to repeat that function three times in
your formula to make it a single function.
On Thu, Jun 18, 2015 at 10:20 AM, jharlan@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:
>
> There is a URL with a string of text that I want to conduct a word count
> on.
>
> The text is between <DIV class="description>Here are the words with
> <b>additional</b> tag formatting that I'd like removed.</DIV>
>
> I use the formula,
>
> =smfstrExtr(RCHGetWebData("www.someurl.com/place
> "),"class="description">","</div")
>
> But nothing is returned. I'm not sure why, but I think the problem is
> with the quotation marks around the word description.
>
> Then once the text is extracted, or concomitantly, I could perform word
> count, using,
>
> =IF(LEN(TRIM(T2))=0,0,LEN(TRIM(T2))-LEN(SUBSTITUTE(T2," ",""))+1)
>
> Where the T2 cell holds the text. But I'd really like it all to be in one
> formula, if possible.
>
> Any thoughts?
>
>
=smfStrExtr(RCHGetWebData($D$4),"class=""description"">","</DIV")
A simpler version:
=smfGetTagContent($D$4,"div",-1,"class=""description"">")
But for a word count, you'd need to repeat that function three times in
your formula to make it a single function.
On Thu, Jun 18, 2015 at 10:20 AM, jharlan@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:
>
> There is a URL with a string of text that I want to conduct a word count
> on.
>
> The text is between <DIV class="
> <b>additional
>
> I use the formula,
>
> =smfstrExtr(
> "),"
>
> But nothing is returned. I'm not sure why, but I think the problem is
> with the quotation marks around the word description.
>
> Then once the text is extracted, or concomitantly, I could perform word
> count, using,
>
> =IF(LEN(TRIM(
>
> Where the T2 cell holds the text. But I'd really like it all to be in one
> formula, if possible.
>
> Any thoughts?
>
>
Thu Jun 18, 2015 3:25 pm (PDT) . Posted by:
jharlan
That "simpler" version works like a charm, but the other internal tags are still there. how do I clean that up and perform the count?
Thanks,
Thanks,
Thu Jun 18, 2015 3:40 pm (PDT) . Posted by:
"Randy Harmelink" rharmelink
If you have the beta version of the add-in from the "Works in Progress" web
page, you can try a new undocumented function I added on 2014-04-07:
=smfStripHTML(smfGetTagContent($D$4,"div",-1,"class=""description"">"))
Otherwise, you need to parse them out yourself. Not a trivial task.
On Thu, Jun 18, 2015 at 3:25 PM, jharlan@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:
>
> That "simpler" version works like a charm, but the other internal tags are
> still there. how do I clean that up and perform the count?
>
page, you can try a new undocumented function I added on 2014-04-07:
=smfStripHTML(smfGetTagContent($D$4,"div",-1,"class=""description"">"))
Otherwise, you need to parse them out yourself. Not a trivial task.
On Thu, Jun 18, 2015 at 3:25 PM, jharlan@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:
>
> That "simpler" version works like a charm, but the other internal tags are
> still there. how do I clean that up and perform the count?
>
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF
Tidak ada komentar:
Posting Komentar