Posted 7 April 2019, 11:50 pm ESTCan I set the range of a "named range" from the code behind with Spread.NET 10? or Spread.NET 12?
Posted by: GEPHILLIPS on 7 April 2019, 11:50 pm EST
Replied 7 April 2019, 11:55 pm ESTI do want to clairify, I am trying to update a "named range" that is already set in a xls file that I am using as a template using Spread.NET 10.
Replied 9 April 2019, 11:15 pm ESTHi,
Yes, you may set the named range from the code behind using addCustomName and get the named range using getCustomName method.
Please refer to the following documentation link for reference:
GetCustomName : http://help.grapecity.com/spread/SpreadNet12/ASP2/webframe.html#FarPoint.Web.Spread~FarPoint.Web.Spread.SheetView~GetCustomName.html
AddCustomName : http://help.grapecity.com/spread/SpreadNet12/ASP2/webframe.html#FarPoint.Web.Spread~FarPoint.Web.Spread.Model.ICustomNameSupport~AddCustomName.html
Replied 10 April 2019, 12:46 am ESTWhat if I am trying to edit a named ranger that is already there from the template spreadsheet?
Replied 12 April 2019, 4:44 am ESTHi,
For this, we need to add the custom name with the same name. For e.g suppose we have the NameRange with "Custom" name in excel file, we may change the name range using the following code:
((FarPoint.Web.Spread.Model.DefaultSheetDataModel)(FpSpread1.ActiveSheetView.DataModel)).AddCustomName("Custom", "$A$1:$C$1", 0, 0);
Hope it helps!