We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Smart Maker Use formula directly when set excel model

Dear all:
Can I use formula directly when set excel model?
Useually,we do like this,&=DataSource.FieldName,
but i want to
-----------------------------------------------------------
A1
(&=DataSouce.MarginRate)/100
------------------------------------------------------------

Reason:
I have a field in datasource named Margin Rate,For example value is
0.01 ,and means 0.01%,
But when i set dataformat by percentage in excel, excel will *100 ,problem happen,
the data will show 1% and but the right string should be 0.01%

Hi,


Well, Smart Markers are not processed in that way, there are two ways to accomplish your needs.

1) Utilize dynamic formulas (in Smart Markers) but, you need to set your markers in the following way.

e.g
A B

&=DataSource.MarginRate &=&=(A{r}/100)


2) Your existing model is like following:
A B

&=DataSource.MarginRate

After your markers are processed, please loop through all the cells in the A column (by using your own code) and divide each entry by 100 manually. See the code below.
cell.PutValue(cell.DoubleValue/100)

Thank you.


Dear Amjad Sahi:
I see,thank you very much.