RhSolutions-AddIn/RhSolutions.AddIn/Tools/ExportTool.cs

13 lines
359 B
C#

namespace RhSolutions.Tools;
internal class ExportTool : ReaderWriterTool, ITool
{
public void Execute()
{
Application app = RhSolutionsAddIn.Excel.Application;
_reader = _readerFactory.GetReader("Excel");
var products = _reader.ReadProducts(app.Selection);
_writer = _writerFactory.GetWriter("NewPrice");
_writer.WriteProducts(products);
}
}