RhSolutions-AddIn/RhSolutions.AddIn/Tools/ConvertTool.cs

20 lines
482 B
C#
Raw Normal View History

2023-04-06 08:29:39 +03:00
using RhSolutions.AddIn;
#if !NET472
using System.Runtime.Versioning;
#endif
namespace RhSolutions.Tools;
#if !NET472
[SupportedOSPlatform("windows")]
#endif
internal class ConvertTool : ToolBase
{
public override void Execute()
{
Application app = RhSolutionsAddIn.Excel.Application;
Worksheet worksheet = app.ActiveWorkbook.ActiveSheet;
var products = _reader.ReadProducts(new[] { worksheet });
_writer.WriteProducts(products);
}
}