Compare commits
5 Commits
6d3f2bf55c
...
a065c4c699
Author | SHA1 | Date | |
---|---|---|---|
a065c4c699 | |||
a73b2441b3 | |||
06e47d3135 | |||
5c50e6bc8e | |||
87f030e0f9 |
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
@ -15,7 +15,8 @@
|
|||||||
],
|
],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"console": "internalConsole",
|
"console": "internalConsole",
|
||||||
"stopAtEntry": false
|
"stopAtEntry": false,
|
||||||
|
"requireExactSource": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": ".NET Core Attach",
|
"name": ".NET Core Attach",
|
||||||
|
@ -8,8 +8,21 @@ public static class RhSolutionsFunctions
|
|||||||
RhSolutionsAddIn.ServiceProvider.GetRequiredService<ICurrencyClient>();
|
RhSolutionsAddIn.ServiceProvider.GetRequiredService<ICurrencyClient>();
|
||||||
|
|
||||||
[ExcelFunction(Name = "РЕХАУ")]
|
[ExcelFunction(Name = "РЕХАУ")]
|
||||||
public static object ProductSearch(string query)
|
public static object ProductSearch(object[,] values)
|
||||||
{
|
{
|
||||||
|
List<string> strings = new();
|
||||||
|
int rows = values.GetLength(0);
|
||||||
|
int columns = values.GetLength(1);
|
||||||
|
for (int row = 0; row < rows; row++)
|
||||||
|
{
|
||||||
|
for (int column = 0; column < columns; column++)
|
||||||
|
{
|
||||||
|
object value = values[row, column];
|
||||||
|
strings.Add(value.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string query = string.Join(" ", strings.ToArray());
|
||||||
var functionName = nameof(ProductSearch);
|
var functionName = nameof(ProductSearch);
|
||||||
var parameters = new object[] { query };
|
var parameters = new object[] { query };
|
||||||
if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net472</TargetFrameworks>
|
<TargetFrameworks>net472;net6.0-windows</TargetFrameworks>
|
||||||
<LangVersion>10</LangVersion>
|
<LangVersion>10</LangVersion>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RootNamespace>RhSolutions</RootNamespace>
|
<RootNamespace>RhSolutions</RootNamespace>
|
||||||
@ -17,8 +17,8 @@
|
|||||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
|
||||||
<PackageReference Include="netDxf" Version="2022.11.2" />
|
<PackageReference Include="netDxf" Version="2022.11.2" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="System.Buffers" Version="4.5.1" />
|
<PackageReference Include="System.Buffers" Version="4.5.1" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user