Putting value in cell which is having name in excel 2007

Hi,

I want to put value in cell of excel. That cell have name which is created by putting value in name_box ( appears in left corner of excel sheet 2007). Could you please provide me syntax for the same?

I am tried with

worksheet.Cells["Max_Size"].PutValue(10);

where Max_Size is column name

Thanks,

Yogita


This message was posted using Aspose.Live 2 Forum

Hi Yogita,

This feature is called Named Range. You have to use following lines of code in order to get the desired result.

Workbook book = new Workbook(inputName, new LoadOptions(LoadFormat.Xlsx));
Range objRange = book.Worksheets.GetRangeByName("ASPOSE_NAME");

Where column C2 = ASPOSE_NAME

Thanks,