Shall I keep excel workbook connection open in C# or open a new one every time I need to add a new row? -
i have implemented download utility downloads files in background thread.now, want implement functionality export download results each file excel sheet. using microsoft.office.interop.excel library purpose.so, create excel workbook, , entries in it.my issue whether open workbook @ start of download process, , close workbook when process finished or shall create new excel connection every time want entry? please, note downloads can take lot of time.
something bear in mind interop
usage creating excel.exe
process in background , using dcom manipulate running process.
typically, means when open file first time , excel not running, take time load. therefore suggest keeping file open in background if going doing incremental updates.
also remember interops hardcoded version of office targetting , require office installed function.
personally, use 3rd party libraries excel manipulation more performant interop
assemblies , don't have hard-dependency of needing office installed on machine.
examples i've used are: spreadsheetgear , flexcel
Comments
Post a Comment