Search for range vaules in Product search function
This commit is contained in:
parent
06e47d3135
commit
a73b2441b3
@ -8,8 +8,21 @@ public static class RhSolutionsFunctions
|
||||
RhSolutionsAddIn.ServiceProvider.GetRequiredService<ICurrencyClient>();
|
||||
|
||||
[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 parameters = new object[] { query };
|
||||
if (ExcelAsyncUtil.RunTask(functionName, parameters, async () =>
|
||||
|
Loading…
Reference in New Issue
Block a user