Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Design Custom Excel Class Library Best Practices

$
0
0

I am designing a class library based on Excel.Interop that has some methods to check some document property values.

I have to package my class library code as a reusable asset in a class library that will be utilized in other applications referencing my library with the intent to create a document list report based on the detected values for large number of documents.

I have been thinking how to design my library code, specifically on opening and disposing excel files.

Should I add a constructor that takes a file-path and take responsibility of opening and disposing files in my library. I will need to worry about opening/disposing for all my exposed methods.

Or should I accept only Excel objects through the constructor and give the responsibility to the referencing code to worry about opening and closing excel files (but i't will again need reference to excel.interop libraries along with as my library).

Please provide some best practices recommendations on this.


PM


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>