I am scanning a number of names by entering some IDs and storing them in an excel sheet.
Now for the invalid IDs, there will be obviously no Name so I want to make the name field empty in the excel sheet and continue to the next ID. How can I make it empty? my name variable is a generic value.
Please Help.
Just use string.empty if the ID is invalid. that will leave an empty field
Use Try Catch block to handle this situation. If there is no name then it will come to catch block.
And also set true to ContinueOnError field. If you are using Try Catch then set it to false.