CurrentRegion property is not available for AsposeExcel.Worksheet

I want to find out CurrentRegion of a given excel cell. Sample code is something below if i use Microsoft interop dll's.

Application _excelApp = new Application();

Microsoft.Office.Interop.Excel.Workbook wb = _excelApp.Workbooks.Open(@"D:\Test\Test.xlsx",

Type.Missing, Type.Missing, Type.Missing, Type.Missing,

Type.Missing, Type.Missing, Type.Missing, Type.Missing,

Type.Missing, Type.Missing, Type.Missing, Type.Missing,

Type.Missing, Type.Missing);

Microsoft.Office.Interop.Excel.Worksheet ws = wb.Sheets[1];

Range current = ws.Cells.Range["B4"].CurrentRegion;

object[,] valueArray = (object[,])current.get_Value(XlRangeValueDataType.xlRangeValueDefault);

Iam using Aspose cells to achive the same thing. I will give first data cell value some thing like 'B4', based on that i want the current region of the cells. i don't want other data in the sheet.

How can i achieve the same using Aspose? Is there any alternative for gettting same result?

sample code:

AsposeExcel.Workbook workbook = new AsposeExcel.Workbook(docStream);

AsposeExcel.Worksheet worksheet = workbook.Worksheets[0];

worksheet.Cells.Here i am not finding anything

For Aspose worksheet Cells i didn't see Range property as well.

Note: CurrentRegion is something like in Excel sheet select a cell value and press Shift + Ctrl + * that will select a particular region of data.

Hi,

Thanks for your posting and using Aspose.Cells.

Please download and use the latest version:
Aspose.Cells
for .NET v7.3.3.2


Please try the Workbook.Settings.Region property and see if it fits your needs.

If it does not fulfill your needs, then please provide us your source xls/xlsx file, expected output and some screenshots explaining your feature in detail.

We will look into it and help you asap.

Hi,


I am not sure completely but as I can understand you are trying to get the selected value in a cell or specify/obtain the specific range of chars in the cell, well, you may use Cell.Characters API for this purpose, see the document for reference: Format cells|Documentation. Also for getting/setting the selected value/chars, as the actions demand the user interaction in WYSIWYG (visual) manner, so Aspose.Cells cannot perform this operation as Aspose.Cells is just a library that does have any interface.

If you need to perform the manipulation of data in the cells visually in grid like environment or control, we have another set of controls:
Aspose.Cells.GridDesktop → grid control for desktop application
Aspose.Cells.GridWeb → grid control for web forms
For more information, see the demos for GridWeb:


Let me know if I understand you correctly or you may give more details (as my fellow colleague asked you) about your issue.

Thank you.

Hello

I know this is an old topic but I think what the original poster means is this - In Office Interop there is a CurrentRegion property for a Range - like so - Range.CurrentRegion Property (Microsoft.Office.Interop.Excel) | Microsoft Learn

What it does is given a cell/range it tells you what the bounding region is.

It is a useful prpoerty to have for many operations that start with a cell and expand outward for various reasons.
Id id check int he latest aspose cells for .net but couldnt find it

@subbuki,

We are afraid, there is no such properly available in Aspose.Cells for .NET APIs. We have logged a ticket with an id “CELLSNET-49173” for your requirements. We will investigate and look into it, we can support it (if feasible).

Once we have an update on it, we will let you know.

The issues you have found earlier (filed as CELLSNET-49173) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao