Fix merged column ordering
This commit is contained in:
parent
e71636f5f8
commit
dc1e8616a6
@ -79,7 +79,7 @@ public class ExcelReader : IReader, IDisposable
|
||||
return readResult;
|
||||
}
|
||||
|
||||
public List<(string, Dictionary<Product, double>)>
|
||||
public IEnumerable<(string, Dictionary<Product, double>)>
|
||||
ReadProducts(IEnumerable<Worksheet> worksheets)
|
||||
{
|
||||
List<(string, Dictionary<Product, double>)> result = new();
|
||||
@ -151,10 +151,10 @@ public class ExcelReader : IReader, IDisposable
|
||||
|
||||
result.Add((wbName, readResult));
|
||||
}
|
||||
return result;
|
||||
return result.OrderBy(x => x.Item1);
|
||||
}
|
||||
|
||||
public List<(string, Dictionary<Product, double>)> ReadProducts(string[] files)
|
||||
public IEnumerable<(string, Dictionary<Product, double>)> ReadProducts(string[] files)
|
||||
{
|
||||
HashSet<string> openedFiles = RhSolutionsAddIn.Excel.Workbooks
|
||||
.Cast<Workbook>()
|
||||
|
@ -192,7 +192,7 @@ public class GuessReader : IReader
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<(string, Dictionary<Product, double>)> ReadProducts(IEnumerable<Worksheet> worksheets)
|
||||
public IEnumerable<(string, Dictionary<Product, double>)> ReadProducts(IEnumerable<Worksheet> worksheets)
|
||||
{
|
||||
List<(string, Dictionary<Product, double>)> result = new();
|
||||
foreach (Worksheet worksheet in worksheets)
|
||||
@ -206,7 +206,7 @@ public class GuessReader : IReader
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<(string, Dictionary<Product, double>)> ReadProducts(string[] files)
|
||||
public IEnumerable<(string, Dictionary<Product, double>)> ReadProducts(string[] files)
|
||||
{
|
||||
_progressBar = new("Открываю исходные файлы...", files.Length);
|
||||
List<Worksheet> worksheets = new();
|
||||
|
@ -3,7 +3,7 @@
|
||||
public interface IReader : IDisposable
|
||||
{
|
||||
public Dictionary<Product, double> ReadProducts(Range range);
|
||||
public List<(string, Dictionary<Product, double>)> ReadProducts(IEnumerable<Worksheet> worksheets);
|
||||
public List<(string, Dictionary<Product, double>)> ReadProducts(string[] files);
|
||||
public IEnumerable<(string, Dictionary<Product, double>)> ReadProducts(IEnumerable<Worksheet> worksheets);
|
||||
public IEnumerable<(string, Dictionary<Product, double>)> ReadProducts(string[] files);
|
||||
new void Dispose();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user