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

Dynamic marker

Thread ID:

Created:

Updated:

Platform:

Replies:

60636 May 9,2007 03:29 PM UTC May 11,2007 07:01 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: XlsIO
gdo
Asked On May 9, 2007 03:29 PM UTC

Hi,

Is it possible to dynamicaly add a marker to a sheet ?

Thanks,
Greg

Melba Winshia [Syncfusion]
Replied On May 10, 2007 07:13 AM UTC

Hi Greg,

Thanks for your interest in Essential XlsIO.

Yes, it is possible to dynamically add a marker to a sheet. Please refer the following code snippet to achieve this:

[C#]

sheet.Range["B2"].Text = "%Marker";
sheet.Range["C2"].Text = "%Marker2.Worksheet.Workbook.Author";
sheet.Range["D2"].Text = "%SimpleArrayMarker";
sheet.Range["E2"].Text = "%ComplexArrayMarker.Address";
sheet.Range["F2"].Text = "%Hash.Key";
sheet.Range["G2"].Text = "%Hash.Value";
sheet.Range["H2"].Text = "%ArrayProperty.Cells.Address";

string[] arrValues = new string[] { "Value1", "Value2", "Value3" };
IRange[] arrValues2 = new IRange[] { sheet.Range["A1"], sheet.Range["A2"], sheet.Range["F6"] };
IDictionary hash = new Hashtable();
hash.Add(1, "Value = 1");
hash.Add(5, "Value = 5");
hash.Add(3, "Value = 3");

//Template marker
ITemplateMarkersProcessor marker = book.CreateTemplateMarkersProcessor();
marker.AddVariable("Marker", "First test of markers");
marker.AddVariable("Marker2", sheet.Range["B2"]);
marker.AddVariable("SimpleArrayMarker", arrValues);
marker.AddVariable("ComplexArrayMarker", arrValues2);
marker.AddVariable("Hash", hash);
marker.AddVariable("ArrayProperty", sheet.Range["B2:G2"]);
marker.ApplyMarkers();

Here is the sample for your reference:

http://websamples.syncfusion.com/samples/XlsIO.Web/4.4.0.51/60636/main.htm

Kindly let me know if you have any other questions.

Thanks,
Melba

gdo
Replied On May 10, 2007 01:25 PM UTC

Thank you ! :D

Melba Winshia [Syncfusion]
Replied On May 11, 2007 07:01 AM UTC

Hi Greg,

Thanks for the update.

Kindly let me know if you have any other 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

;