From e4cf11794db5507ad4eb3601b85cc67f711ad834 Mon Sep 17 00:00:00 2001 From: DaTekShaman Date: Thu, 16 Apr 2026 17:30:08 +0300 Subject: [PATCH] Add fMakeExcelLink function for generating Excel hyperlink formulas --- power-query/fAddLogEntry.m | 15 +++++++++++++++ power-query/fMakeExcelLink.m | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 power-query/fAddLogEntry.m create mode 100644 power-query/fMakeExcelLink.m diff --git a/power-query/fAddLogEntry.m b/power-query/fAddLogEntry.m new file mode 100644 index 0000000..c31ab8e --- /dev/null +++ b/power-query/fAddLogEntry.m @@ -0,0 +1,15 @@ +let + fAddLogEntry = ( T_MESSAGE as text, + optional I_LEVEL as number, + optional LST_EXISTING as nullable list) as list => + let + ExistingData = if P_LINK = null then "" else P_LINK, + LinkText = if P_LINK_TEXT = null then + try fP("LINK_SYMBOL") otherwise P_LINK + else + P_LINK_TEXT, + Result = "=ГИПЕРССЫЛКА(""" & Link & """;""" & LinkText & """)" + in + Result +in + fAddLogEntry \ No newline at end of file diff --git a/power-query/fMakeExcelLink.m b/power-query/fMakeExcelLink.m new file mode 100644 index 0000000..cd20464 --- /dev/null +++ b/power-query/fMakeExcelLink.m @@ -0,0 +1,14 @@ +let + fMakeExcelLink = ( P_LINK as nullable text, + optional P_LINK_TEXT as nullable text) as text => + let + Link = if P_LINK = null then "" else P_LINK, + LinkText = if P_LINK_TEXT = null then + try fP("LINK_SYMBOL") otherwise P_LINK + else + P_LINK_TEXT, + Result = "=ГИПЕРССЫЛКА(""" & Link & """;""" & LinkText & """)" + in + Result +in + fMakeExcelLink \ No newline at end of file