FormatConditions
-
Hello I've a question about FormatConditions (Interop.Excel) I need sent to parameter a string empty value, however in execution mode, the app throw a exception "Additional information: The parameter is incorrect." See the code below:
rng.FormatConditions.Add(XlFormatConditionType.xlCellValue,XlFormatConditionOperator.xlEqual,"",Type.Missing);
How can I sent a empty string param? Thks all -
Hello I've a question about FormatConditions (Interop.Excel) I need sent to parameter a string empty value, however in execution mode, the app throw a exception "Additional information: The parameter is incorrect." See the code below:
rng.FormatConditions.Add(XlFormatConditionType.xlCellValue,XlFormatConditionOperator.xlEqual,"",Type.Missing);
How can I sent a empty string param? Thks allWhat are you trying to accomplish, a conditional format which checks for an empty string or to delete an existing conditional format. If the former have you tried:
rng.FormatConditions.Add(XlFormatConditionType.xlCellValue, XlFormatConditionOperator.xlEqual, "\"\"", Type.Missing);
Which is an escaped "" sequence, i.e. you're passing "" to the function not an empty string (0 characters in length).