From e7d3fe2beae326a2380b4cfed7f33961f40d87ca Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Thu, 11 Nov 2021 16:33:40 +0300 Subject: Init commit --- Functions.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Functions.cs (limited to 'Functions.cs') diff --git a/Functions.cs b/Functions.cs new file mode 100644 index 0000000..999a942 --- /dev/null +++ b/Functions.cs @@ -0,0 +1,24 @@ +using ExcelDna.Integration; + +namespace Rehau.Sku.Assist +{ + public class Functions : IExcelAddIn + { + [ExcelFunction(description: "Получение наименования и артикула позиции")] + public static string RAUNAME(string request) + { + SkuAssist.EnsureHttpInitialized(); + return SkuAssist.GetSku(request); + } + + public void AutoClose() + { + ExcelIntegration.RegisterUnhandledExceptionHandler( + delegate (object ex) { return string.Format("!!!ERROR: {0}", ex.ToString()); }); + } + + public void AutoOpen() + { + } + } +} \ No newline at end of file -- cgit v1.2.3