24 lines
639 B
C#
24 lines
639 B
C#
#if !NET472
|
|
using System.Runtime.Versioning;
|
|
#endif
|
|
|
|
namespace RhSolutions.Tools;
|
|
|
|
internal class GuessTool : Tool
|
|
{
|
|
public GuessTool(ReaderFactory readerFactory, WriterFactory writerFactory) : base(readerFactory, writerFactory)
|
|
{
|
|
}
|
|
|
|
public override 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);
|
|
}
|
|
}
|
|
|