Is it possible to return a list of all ranges from all worksheets in an Excel 2002 workbook?
- by generalt
Hello all.
I want to extract "special" data from an Excel 2002 (client requirement, cannot change) workbook and worksheets contained therein. I have classified ranges in this "special" data category. I would like to acquire a list of all ranges in, ideally, all worksheets in a workbook. The attributes I'm interested in are the range name, and the range address. I have been googling for a while now, and have not found anything relevant.
I was assuming the Excel 2002 API would expose something like this:
ApplicationClass app = new ApplicationClass();
Workbook workbook = app.Workbooks.Open(@"c:\file.xls", ...);
Worksheet worksheet = workbook.Worksheets["sheet1"] as Worksheet;
Range[] ranges = worksheet.GetAllRanges();
or something similar. However, I am sadly mistaken.
Is this possible with Excel 2002?