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

Free Support Forum - aspose.com

Concatenate Smart Markers in Aspose.Cells

Hello,
I would like to know if it is possible to Concatenate smart markers in excel. I want to show as
John Doe(m3jd00)

I am trying to do : sheet.Cells[“D2”].PutValue("&=AuditLogs.UserFullName ("&=AuditLogs.NetworkName))

What is the syntax for this?

Thanks

@kshah05,

By design, it is not supported in Smart Markers. As workaround, you may first insert relevant markers in different column cells (you may hide them or even delete them after the markers are processed and formulas are evaluated/calculated afterwards) and then use their respective row values in dynamic formulas of Smart Markers. For example, you may use Concatenate function in the following way for the dynamic formula marker to accomplish your task accordingly:
e.g.
B____________________________C____________________________ D

&=AuditLogs.UserFullName &=AuditLogs.NetworkName &=&=Concatenate(B{r}, “(”, C{r}, “)”)

Moreover, after the markers are processed (i.e., after the line: workbookdesigner.Process();) and data is filled with data, call Workbook.CalculateFormula() method. Now you may loop through your desired cells in the D column to replace your formulas with calculated value.

....
cell.PutValue(cell.StringValue); 

Now even you may remove B and C column using relevant Aspose.Cells APIs.

Hope, this helps a bit.