I hope things are going well as you're getting ready for the Holiday Season.
I was wondering if you had a couple of minutes to read over a WCF issue I've been working on trying to resolve.
I have a WCF service which utilizes XL Spreadsheets on the backend as part of it's calculation engine. I'm using a 3rd party .Net based component called Aspose to access, manipulate and retrieve data from the spreadsheet.
Unfortunately, Aspose ran into a couple of calculation bugs. In in order to overcome these issues, as a temporary fix, I save a temporary copy of the current spreadsheet. I then open the spreadsheet (which forces a recalc) with the Microsoft Excel .Net library - Microsoft.Office.Interop.E
xcel. Then I reopen that temp spreadsheet using Aspose to collect the result values
This fix has worked fine as I've been implementing/debugging the solution locally.
When I deployed the service to IS 7.0, the MS .Net Excel library fails when attempting to open the file.
I think this some kind of permissions issue with the deployed IIS service.
This is a snippet of the code that is failing
The following code block where I opening a filestream and passing it to the Aspose library call works.
String fullPath1 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "BCBSDiabetesCalculator.xlsm");
// Open to force Excel to perform calculation itself
Microsoft.Office.Interop.Excel.Application excelApp1 = new Microsoft.Office.Interop.Excel.Application();
var excelWorkbook1 = excelApp1.Workbooks.Open(fullPath1);
//Get the Excel file into stream
FileStream stream = new FileStream(fileName, FileMode.Open);
//Instantiate LoadOptions specified by the LoadFormat.
LoadOptions loadOptions = new LoadOptions(LoadFormat.Xlsx);
//Create a Workbook object and opening the file from the stream
_workbook = new Workbook(stream, loadOptions);
if (_workbook == null)
// Make sure that we close the stream.
Do you have any insight/ideas on how to resolve this?