C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,188 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Trying to create an Excel file using Office.Interop.dll (15.0.4795.1001).But it is taking the default file path instead of the path which set manually.
if (extensionObj != null)
{
relativeExcelPath = string.Concat(System.IO.Path.GetDirectoryName(extensionObj.WorkflowPath), "\\", workflowName);
}
// Checking if excel file is present in workflow running directory, if exists then open the file in workflow running directory otherwise
// continue with user supplied path.
excelPath = System.IO.File.Exists(relativeExcelPath) ? relativeExcelPath : context.GetValue(Path);
```public static void SaveExcel(excel.Workbook myWorkBook)
{
excel.Application myApp;
myApp = new excel.Application();
myWorkBook.Save()