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 input excel file U16String sampleCopyingRowsAndColumns = dirPath + u"sampleCopyingRowsAndColumns.xlsx"; //Path of output excel file U16String outputCopyingRowsAndColumns = outPath + u"outputCopyingRowsAndColumns.xlsx"; //Read input excel file Workbook workbook(sampleCopyingRowsAndColumns); //Accessing the first worksheet in the Excel file Worksheet worksheet = workbook.GetWorksheets().Get(0); //Copy the third column to eighth column worksheet.GetCells().CopyColumn(worksheet.GetCells(), 2, 7); //Save the Excel file. workbook.Save(outputCopyingRowsAndColumns); Aspose::Cells::Cleanup();