Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells for C++ now supports creation as well as the manipulation of the Named Ranges. The following code snippet demonstrates how simple is to use Aspose.Cells for C++ API to create named ranges.
C++
//Path of your directory where you want to read or write files from
StringPtr dirPath = new String("D:\\Downloads\\");
//Path of output excel file
StringPtr outCreateNamedRange = (new String(dirPath))->Append(new String("outCreateNamedRange.xlsx"));
//Create a workbook
intrusive_ptr<IWorkbook> wb = Factory::CreateIWorkbook();
//Access first worksheet
intrusive_ptr<IWorksheet> ws = wb->GetIWorksheets()->GetObjectByIndex(0);
//Create a range
intrusive_ptr<IRange> rng = ws->GetICells()->CreateIRange((intrusive_ptr<String>)new String("A5:C10"));
//Set its name to make it named range
rng->SetName((intrusive_ptr<String>)new String("MyNamedRange"));
//Read the named range created above from names collection
intrusive_ptr<IName> nm = wb->GetIWorksheets()->GetINames()->GetObjectByIndex(0);
//Print its FullText and RefersTo properties
printf("Full Text: %s\n", nm->GetFullText()->charValue());
printf("Refers To: %s\n", nm->GetRefersTo()->charValue());
//Save the workbook in xlsx format
wb->Save(outCreateNamedRange, SaveFormat_Xlsx);
Besides creating new Named Ranges, Aspose.Cells for C++ APIs also support to manipulate existing Named Ranges. The following code snippet uses the Aspose.Cells for C++ API to manipulate an existing named range.
C++
//Path of your directory where you want to read or write files from
StringPtr dirPath = new String("D:\\Downloads\\");
//Path of source excel file
StringPtr srcManipulateRange = (new String(dirPath))->Append(new String("srcManipulateRange.xlsx"));
//Path of output excel file
StringPtr outManipulateRange = (new String(dirPath))->Append(new String("outManipulateRange.xlsx"));
//Create a workbook
intrusive_ptr<IWorkbook> wb = Factory::CreateIWorkbook(srcManipulateRange);
//Read the named range created above from names collection
intrusive_ptr<IName> nm = wb->GetIWorksheets()->GetINames()->GetObjectByIndex(0);
//Print its FullText and RefersTo properties
printf("Full Text: %s\n", nm->GetFullText()->charValue());
printf("Refers To: %s\n", nm->GetRefersTo()->charValue());
//Manipulate the RefersTo property of NamedRange
nm->SetRefersTo((intrusive_ptr<String>)new String("=Sheet1!$D$5:$J$10"));
//Save the workbook in xlsx format
wb->Save(outManipulateRange, SaveFormat_Xlsx);
The LinkToXmlMap method has been added to the ICells class which is useful in linking an XML map.
The ImportCSV method has been added to the ICells class which is useful importing a CSV file onto the cells of a worksheet.
The GetIProtectedRangeCollection method has been added to the ICells class which is useful importing a two-dimensional array of data onto a worksheet.
The GetIProtectedRangeCollection method has been added to the IWorksheet class which is useful in retrieving the collection of IProtectedRange objects.
The GetIProtectedRangeCollection method has been added to the IWorksheet class which is useful in retrieving the edit range collection from the worksheet.
The ClearPivottables method has been added to the IWorkbookSettings class which is useful in clearing all Pivot Tables from a given spreadsheet.
The CreateIRange method has been added to the IWorksheetCollection class which is useful in creating an object of the IRange by passing cell references in string format.
The IsVisible method gets the visibility status of an external link in Excel application.
Aspose.Cells for C++ 17.1.0 has exposed the GetScaleCrop & SetScaleCrop methods to the IBuiltInDocumentPropertyCollection class. These methods are useful to get or set the ScaleCrop property which indicates the display mode of the document thumbnail.
Aspose.Cells for C++ 17.1.0 has exposed the GetLinksUpToDate & SetLinksUpToDate methods to the IBuiltInDocumentPropertyCollection class. These methods are useful to get or set the LinkUpToDate property which indicates whether hyperlinks in a document are up-to-date.
Aspose.Cells for C++ 17.1.0 has exposed the GetAbsolutePath & SetAbsolutePath methods to the IWorkbook class. These methods are useful to get or set the absolute path of the file which can only be used for external links.
This release of Aspose.Cells for C++ has exposed the GetFormula & SetFormula methods for the IListColumn class. These methods are useful to get or set the formula of a list column.
This release of Aspose.Cells for C++ has exposed the GetCheckCompatibility & GetCheckCompatibility methods for the IWorkbookSettings class. These methods are useful to get or set the compatibility check property indicating if the API should check the compatibility when saving workbook. The default value is true, and can be set to false if application requirement is not to check the compatibility.
Aspose.Cells for C++ has now exposed the GetILightCellsDataHandler & SetILightCellsDataHandler methods for the ILoadOptions class. These methods denotes the data handler for processing cells data while reading template file.
Aspose.Cells for C++ has exposed the GetCultureInfo & SetCultureInfo methods for the ILoadOptions class. These methods can get or set the system culture info at the time file loading.
It is advised to use the ICells::GetLastDataRow method instead.
It is advised to use the ICell::GetIConditionalFormattingResult method instead.
It is advised to use the IPageSetup::GetPrintDraft & IPageSetup::SetPrintDraft methods instead.
With the release of Aspose.Cells for C++ 17.1.0, we have removed a few method which were not in use therefore deemed unnecessary. Here is the list of all such methods.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.