ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Performance issue with accessing Microsoft.Office.Core.DocumentPro (https://www.excelbanter.com/excel-programming/438680-performance-issue-accessing-microsoft-office-core-documentpro.html)

Raghvendra

Performance issue with accessing Microsoft.Office.Core.DocumentPro
 
Hi,

I have a Excel COM addin which reads the CustomDocumentProperties section of
a workbook.

This is how I access a particular entry from the CustomDocumentProperties
section

DocumentProperties docProperties = (DocumentProperties)
xlWorkbook.CustomDocumentProperties;

docProperty = docProperties[propName];

The problem is when the CustomDocumentProperties contain more than 8000
entries, the performance of this code is really bad. I have ran CPU profiler
and it showed that the following line takes more than a minute.

docProperty = docProperties[propName];
Does anyone know how to improve the performance of accessing
DocumentProperties?

Thanks!


All times are GMT +1. The time now is 02:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com