Are the Office Interop assemblies thread safe?
I would be using them (Excel specifically) in a web app. Office version is 2007.
Is there a better way to interface with Excel?
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Are the Office Interop assemblies thread safe?
I would be using them (Excel specifically) in a web app. Office version is 2007.
Is there a better way to interface with Excel?
@phreaks:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.applicationclass(office.11).aspx">http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.applicationclass(office.11).aspx
"Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe."
@phreaks:what exactly are you trying to do in excel? if you're just reading data out then go with ado.net and treat it as a datasource.
for simple things i sometimes take advantage of the fact that excel (and word) can read/open html files. no interop needed for quick simple tasks of displaying grids of data with some lite formatting. just write the html file out to the browser with an excel extension header.
if you're diggin deeper with pivots and formulas, as far as i know interop is the way to go with office installed on the server. i think there are other 3rd party libs out there as well, but i have yet to have the need (would love to also hear recommondations though).
@phreaks: You can also use the OfficeOpenXML SDK 2 to create the Excel (or any other Office) file. Using the SDK doesn't require Excel but be warned that creating such a file is horribly complex.
hrmm... so i have an .xlsx file on my desktop. if i change the extension to .zip and open it up, i see the xml internals with relationships. is it naive to think if i could write these xml/rels as text, i could recreate the file from scratch?
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.