//For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-C //Path of input excel file StringPtr sampleGroupingUngroupingRowsAndColumns = dirPath->StringAppend(new String("sampleGroupingUngroupingRowsAndColumns.xlsx")); //Path of output excel file StringPtr outputGroupingUngroupingRowsAndColumns = outPath->StringAppend(new String("outputGroupingUngroupingRowsAndColumns.xlsx")); //Read input excel file intrusive_ptr workbook = Factory::CreateIWorkbook(sampleGroupingUngroupingRowsAndColumns); //Accessing the second worksheet in the Excel file intrusive_ptr worksheet = workbook->GetIWorksheets()->GetObjectByIndex(1); //UnGroup first seven rows and first four columns worksheet->GetICells()->UngroupRows(0, 6); worksheet->GetICells()->UngroupColumns(0, 3); //Save the Excel file. workbook->Save(outputGroupingUngroupingRowsAndColumns);