Adding Parameters (Robotics)
All,
I have the following code which I am using for deleting row in excel, I would like to add a parameter as the File path location will be variable.
Previously there an input box on the script window which allowed you to delcare the parameters for the script but this is no longer there.
Excel.Application myApp;
Excel.Workbook myWorkBook;
Excel.Worksheet myWorkSheet;
Excel.Range range;
myApp = new Excel.Application();
myWorkBook = myApp.Workbooks.Open("FILE PATH", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false , 0, true, 1, 0);
myWorkSheet = (Excel.Worksheet)myWorkBook.Worksheets.get_Item(1);
range = (Excel.Range)myWorkSheet.Application.Rows[1, Type.Missing];
range.Select();
range.Delete(Excel.XlDirection.xlUp);
myWorkBook.Close(true);
myApp.Quit();