Aspose.cells find and replace

Hello,

I need some help with the following.

My spreadsheet produce a calculation in column C such as C1 = A1/B1

First question how to copy that formula down all the way to C100. ( I was able to do it using a loop but it must be a better way)

For i = 1 To 100

w.Worksheets(0).Cells("C" & i).Formula = "=A" & i & "/" & "B" & i

Next

Second question is :

some of the division will yield the error #DIV/0!

I need to loop from C1 to C100 and find cells with #DIV/0! and replace with ""

How can I use aspose cells Findoptions or ReplaceOptions to achieve this search and replace operation?

Thanks,

Hi,


1) You may use Shared Formula feature provided by Aspose.Cells for .NET:
http://docs.aspose.com/display/cellsnet/Setting+Shared+Formula

2) Please check:
http://docs.aspose.com/display/cellsnet/Find+or+Search+Data


You may try to Find the cell value using the FindOptions, after getting the cell, you may replace it with your desired value.


Thank you.

Shared formula works great ,

Thank you

Hi,

Thanks for your feedback.

We are pleased to know that SharedForumla suits your needs.

Let us know if you face any other issue relating to Aspose.Cells, we will be glad to help you again.

Besides, we recommend you to download and try the latest offline demos to be familiar with Aspose.Cells API(s) quickly.

These demos can work with Visual Studio 2005, 2008 or 2010. Please read the readme.txt file before running the demos.