XLSX file with HTML elements and Variables

4 views
Skip to first unread message

Konstantinos Chatzitheodorou

unread,
Oct 28, 2025, 12:16:50 PM (5 days ago) Oct 28
to okapi-devel
Is there any way to use a filter that matches both HTML elements in an XLSX file together with variables wrapped in [] or starting with $?

Having subfilter=okf_html in my okf_openxml config works, but I cannot add the regexes

Here is a sample of what I would like to match


<p>Hello <b>[NAME]</b>, your subscription will renew on <i>[RENEWAL_DATE]</i>. Please confirm by %CONFIRM_LINK.</p>


<div>Hi <strong>%USERNAME</strong>, you have <span class="badge">$CREDITS</span> credits remaining — use them before <em>[EXPIRY_DATE]</em>.</div>


<p>Dear <b>[RECIPIENT]</b>, your invoice of <u>$AMOUNT</u> for order <code>%ORDER_ID</code> is ready — download it <a href="%INVOICE_URL">here</a>.</p>


<section>Reminder: <span><b>%PROJECT_NAME</b></span> is due on <time>[DUE_DATE]</time>. Contact <a href="mailto:%PM_EMAIL">%PM_NAME</a> for questions.</section>


<p>Congrats <strong>[USER_DISPLAY_NAME]</strong> — you unlocked the <em>%ACHIEVEMENT</em> badge! View details in your profile: <a href="/profile/$USER_ID">Profile</a>.</p>

Chase Tingley

unread,
Oct 28, 2025, 1:24:49 PM (5 days ago) Oct 28
to okapi...@googlegroups.com
The OpenXML filter won't apply both the codefinder and the subfilter at the same time.  However, you can work around this by defining the codefinder in an HTML configuration, and then calling that custom HTML filter as a subfilter.

Unfortunately, working with the codefinder in the HTML filter editor (which is just a text area) is not very easy to work with.  The syntax looks like this: https://okapiframework.org/wiki/index.php/HTML_Filter#Inline_Code_Finder

--
You received this message because you are subscribed to the Google Groups "okapi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-devel...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/okapi-devel/99d93032-3bc9-49cd-9726-30cd3cb869c1n%40googlegroups.com.

Konstantinos Chatzitheodorou

unread,
Oct 29, 2025, 9:20:10 AM (4 days ago) Oct 29
to okapi-devel
Thank you for your prompt reply and your great idea.

I have done it with the HTML filter. I am sharing it since it could help the community.


okf_html@multi.fprm
Reply all
Reply to author
Forward
0 new messages