WorkbookReplace Method (String, String, Boolean) |
Replaces a cell's value with a new string array.
Namespace:
Aspose.Cells
Assembly:
Aspose.Cells (in Aspose.Cells.dll) Version: 22.5.0.0 (22.5.0)
Syntaxpublic int Replace(
string placeHolder,
string[] newValues,
bool isVertical
)
Public Function Replace (
placeHolder As String,
newValues As String(),
isVertical As Boolean
) As Integer
public:
int Replace(
String^ placeHolder,
array<String^>^ newValues,
bool isVertical
)
member Replace :
placeHolder : string *
newValues : string[] *
isVertical : bool -> int
Parameters
- placeHolder
- Type: SystemString
Cell placeholder - newValues
- Type: SystemString
String array to replace - isVertical
- Type: SystemBoolean
True - Vertical, False - Horizontal
Return Value
Type:
Int32
Examples [C#]
Workbook workbook = new Workbook();
......
string[] newValues = new string[]{"Tom", "Alice", "Jerry"};
workbook.Replace("AnOldValue", newValues, true);
[Visual Basic]
Dim workbook As Workbook = New Workbook()
.............
Dim NewValues() As String = New String() {"Tom", "Alice", "Jerry"}
workbook.Replace("AnOldValue", NewValues, True)
See Also