This project has moved. For the latest updates, please go here.

Bug?

Apr 14, 2011 at 12:59 PM

var wb = new XLWorkbook();
var wsData = wb.Worksheets.Add("Data");
IXLCell xcell = wsData.Cell(1, 1);
xcell.Value = "Test";
wsData.NamedRanges.Add("RangeName", xcell.AsRange(), "Comment");
wb.SaveAs("c:\\NamedRanges.xlsx");

Hi!

I think this has been working before, has it stopped working or is there something wrong with the code above?

Before I got a named range, but now there is no range created!?

Thanks!

Apr 14, 2011 at 1:04 PM

Well, xcell.AddToNamed("RangeName", XLScope.Worksheet, "Comment"); seems to work and might be just as good. But interesting to see why the above has stopped working?

Coordinator
Apr 14, 2011 at 2:26 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 14, 2011 at 2:28 PM

That was my bad, my tests only covered xcell.AddToNamed(...) not adding it directly =/

This has been fixed on v0.51.2

Apr 14, 2011 at 3:40 PM

Wow, less then two hours. Fantastic support! :) Thanks!