We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with IWorksheet.Replace()

Thread ID:





64182 Jul 16,2007 03:47 PM UTC Jul 17,2007 08:39 AM UTC WinForms 1
Tags: XlsIO
Christian Nein
Asked On July 16, 2007 03:47 PM UTC


the IWorksheet.Replace() method only seems to find whole strings. How can I search (and replace) for a part of a string?

E.g. a cell on the worksheet "sheet" contains the text "Current database: @database". After executing the command:

sheet.Replace("@database", "Test-DB");

... the text in the cell sould be:
"Current database: Test-DB"

In MS Excel, we used this command to get the desired functionality:

sheet.Cells.Replace(findText, replaceText, XlLookAt.xlPart, XlSearchOrder.xlByRows, false/*MatchCase*/, /*MatchByte*/false);

Thanks & best regards

Melba Winshia [Syncfusion]
Replied On July 17, 2007 08:39 AM UTC

Hi Christian,

Thank you for your interest in Essential XlsIO.

Currently it is possible only to find whole strings and it is not possible to search for a part of a string. We have already logged "Feature to find and replace for a part of a string" as a feature request and notified our development team. We will implement this feature in our forthcoming new version releases or service pack releases. We usually have a timeframe of at least three months between releases. The feature implementation would also greatly depend on the factors like product design, code compatibility and complexity. We will get back to you once the feature is implemented.

Please let me know if you have any more questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon