ExcelTemplate .NET Reference
RemoveExtraDataMarkers Property |
New in V5 |
C# Syntax:
VB.NET Syntax:
Description:
Sets whether ExcelWriter should remove data markers in the
template that do not bind to data sources in code. By default,
if a data marker does not bind to a data source,
ExcelWriter will throw an exception. If RemoveDataMarkers
is set to true, ExcelWriter will remove
extra data markers silently.
If a data marker includes the "Optional"
modifier, and does not bind to a data source,
ExcelWriter will remove it without error even if RemoveDataMarkers is set
to false. For more information on data marker modifiers, see
Creating Data Markers.
RemoveExtraDataMarkers is a Read/Write property.
In ASP.NET, if a data marker contains a data source number and/or field number
(for example, %%=#7.#3 or %%=Orders.#3) and is not bound to a data
source in script, the data marker will be removed without error whether
RemoveDataMarkers is set to true or not.
In ASP, if a data marker contains a field number
(for example, %%=Orders.#3) and is not bound to a data
source in script, the data marker will be removed without error whether
RemoveDataMarkers is set to true or not.
|
Example:
[C#]
//--- Setting RemoveDataMarkers to 'true' tells
//--- ExcelWriter to remove data markers that do not
//--- bind to a data source.
xlt.RemoveExtraDataMarkers = true;
[VB.NET]
'--- Setting RemoveDataMarkers to 'True' tells
'--- ExcelWriter to remove data markers that do not
'--- bind to a data source.
xlt.RemoveExtraDataMarkers = True
Copyright © 2005, SoftArtisans, Inc.