Replace Hypen words

How can i replace hyphen between words in aspose.cells.
Any example in .net?


Please spare us some time, we will look into your issue and help you asap.


Thanks for your query and we are sorry for a delayed response. You may please give a try to the following sample code and provide your feedback.

string TXBX_Find = "-";
string TXBX_Replace = "*";
Workbook workbook = new Workbook(path + "book1.xlsx");
FindOptions Opts = new FindOptions();
Opts.LookInType = LookInType.Values;
Opts.LookAtType = LookAtType.Contains;
string found = "";
Aspose.Cells.Cell cell = null;
foreach (Worksheet sheet in workbook.Worksheets)
        cell = sheet.Cells.Find(TXBX_Find, cell, Opts);
        if (cell != null)
            string celltext = cell.Value.ToString();
            celltext = celltext.Replace(TXBX_Find, TXBX_Replace);
    while (cell != null);
workbook.Save(path + "book2.xlsx"); (6.7 KB) (7.7 KB)