diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2021-11-11 16:33:40 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2021-11-11 16:33:40 +0300 |
commit | e7d3fe2beae326a2380b4cfed7f33961f40d87ca (patch) | |
tree | 8da936709596912823ebbca2790c725fd50d434e /Functions.cs |
Init commit
Diffstat (limited to 'Functions.cs')
-rw-r--r-- | Functions.cs | 24 |
1 files changed, 24 insertions, 0 deletions
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 |