PFA sample with expected and the smart markers i am currently trying out.
The Smart marker in H5 is the one i am currently having trouble with.
The data in my source comes as TRUE/FALSE but i need to display Yes/No. And i was hoping to code that logic into the Smart marker. Is this possible?
Sample1.zip (8.2 KB)
@nikhilpinto,
Your dynamic formula is not right and we are not sure about what you want to do with this statement (i.e., “H51&=Source.Active=“TRUE””)? Also, please provide an Excel file containing two sheets. First sheet should give current output data (against markers) and second worksheet should contain your expected output data. This will help to understand you precisely and we can assist you accordingly.
Sample1.zip (8.9 KB)
PFA updated Excel as requested.
The Data in my source for IsActive field (column C) comes as TRUE/FALSE. However i need to Display the output as Yes/No. I was trying to use an EXCEL function in combination with smart markers to produce the desired output. However i get an error.
@nikhilpinto,
You have two options to cope with it.
1). Use Dynamic Smart Markers properly which Aspose.Cells could understand it. Here you cannot evaluate the same cell (in the column) for evaluation. You may workaround it by inserting another column b/w your two main columns. For example, you will insert a column in b/w “Country” and “Active” columns (G column will be temporary column and you will hide it in the template file):
F ========================= G ======================H
&=Source.Country ----------------------- &=Source.IsActive ----------------&=&=IF(G{r}=TRUE,“Yes”, “No”)
2). Do not handle it in Smart Markers. Once the markers are processed and data is filled into the cells, you may try some shared formula to replace your desired text in the “Active” column in one go, see the document on how to specify shared formula feature via Aspose.Cells APIs.
PFA. This solution seems to be working with mixed results.
If you observe cell E6 in Sheet1, the dynamic formula has been processed incorrectly and it has not carried over to the rest of the rows . In Sheet 2 the dynamic formula works fine.
I have included the smart markers in adjacent cells they are same for the both the sheets.
The only difference between the two sheets is that in Sheet 1 i have another date smart marker. Will that be the cause that the dynamic formula is not generating correctly?
Sample1.zip (9.9 KB)
@nikhilpinto,
This should not be due this date smart markers. Anyways, you may try the date marker like this if it makes any difference:
&=StaticSource.Date(noadd)
If you still find the issue in first sheet, kindly do share sample code (runnable) to generate the Excel file containing such output data in first sheet, we will check it soon.