Manipulate Selection

Hello,

In VBA there is an object that represents a selection is there an equivalent object in aspose cell ?

After a finish adding data to my worksheet I need to set focus on a particular cell "D1" so when the sheets is first open "D1" is selected.

How to achieve that ?

Thanks,

Hi,

1)

If you want to select multiple cells and copy them, then you should use Range object in Aspose.Cells for .NET.

Please see these documents:
Copy Range Style Only
Copy Range Data Only
Copy Range Data with Style

2)

You can activate any cell, please see the code below and its output xlsx file attached.

Please download the latest version:
Aspose.Cells for .NET v7.0.1.6


C#


Workbook workbook = new Workbook();

Worksheet worksheet = workbook.Worksheets[0];

worksheet.ActiveCell = “D1”;


workbook.Save(@“F:\Shak-Data-RW\Downloads\Output.xlsx”, SaveFormat.Xlsx);


Thank you for your response