xlrun.exe -xlFileOpen MyWorkbook.xlsx -xlRefreshLeftToRight -xlRngGet Summary!TestStatus
xlrun.exe -xlFileOpen MyMacrobook.xlsm -xlEvalMacro MyMacro -xlRngGet Summary!B4 -xlFileSave
xlrun.exe -xlFileNew -xlRngSet A1 1.0 -xlRngGet A1 -xlRngSet A2 =today() -xlRngGet A2 -xlFileSaveAs MyGeneratedBook.xlsx
A local install of Excel is required. Excel is invoked using COM Automation.
Project file was created with commands below (manually modifying the project file to target net48 for COM support):
dotnet new console
dotnet add package Microsoft.Office.Interop.Excel
Project is built with:
dotnet build