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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with IWorksheet.Replace()

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,

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
Christian

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.

Thanks,
Melba

CONFIRMATION

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.

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

;