Aspose::Cells::Startup(); //For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-C //Path of input U16String dirPath(u""); //Path of output U16String outPath(u""); //Path of output excel file U16String outputCreateNamedRange = outPath + "outputCreateNamedRange.xlsx"; //Create a workbook Workbook wb; //Access first worksheet Worksheet ws = wb.GetWorksheets().Get(0); //Create a range Range rng = ws.GetCells().CreateRange(u"A5:C10"); //Set its name to make it named range rng.SetName(u"MyNamedRange"); //Read the named range created above from names collection Name nm = wb.GetWorksheets().GetNames().Get(0); //Print its FullText and RefersTo memebers std::cout << "Full Text : " << nm.GetFullText().ToUtf8() << std::endl; std::cout << "Refers To: " << nm.GetRefersTo().ToUtf8() << std::endl; //Save the workbook in xlsx format wb.Save(outputCreateNamedRange, SaveFormat::Xlsx); Aspose::Cells::Cleanup();