2024-11-09 22:59:46 +03:00
|
|
|
|
namespace RhSolutions.Tools;
|
2023-05-23 06:54:37 +03:00
|
|
|
|
|
2024-11-09 22:59:46 +03:00
|
|
|
|
internal class GuessTool : ReaderWriterTool, ITool
|
2023-05-23 06:54:37 +03:00
|
|
|
|
{
|
2024-11-09 22:59:46 +03:00
|
|
|
|
public void Execute()
|
|
|
|
|
{
|
|
|
|
|
Application app = RhSolutionsAddIn.Excel.Application;
|
|
|
|
|
Worksheet worksheet = app.ActiveWorkbook.ActiveSheet;
|
|
|
|
|
_reader = _readerFactory.GetReader("Guess");
|
|
|
|
|
var products = _reader.ReadProducts(new[] { worksheet });
|
|
|
|
|
_writer = _writerFactory.GetWriter("NewPrice");
|
|
|
|
|
_writer.WriteProducts(products);
|
|
|
|
|
}
|
|
|
|
|
}
|