c# - How to view and edit xls,xlsx, docx, etc..files in Microsoft Excel with Service Fabric Application? -


i need view , edit excel , doc files, etc files in microsoft excel. written code this

                `using excel = microsoft.office.interop.excel;                 excel.application excelapp = new excel.application();                  excelapp.visible = true;                  string work book path 2 = "c:/users/user/downloads/sample";                  excel.workbook excel workbook = null;                 excelworkbook = excelapp.workbooks.open(workbookpath2, 0,                 false, 5, "", "", false, excel.xlplatform.xlwindows, "", true,                 false, 0, true, false, false);` 

if normal console application working fine. using service fabric application. service fabric application run in multiple nodes.i facing below issues. have file stream -> need create 1 temporary file file stream. here problem service fabric running multiple modes not accessing temporary file path. below temporary file path creation code

                byte[] filedata = new byte[filestream.length];                 var tmpfile = path.gettempfilename();                 var tmpfilestream = file.openwrite(tmpfile);                 tmpfilestream.write(filedata, 0, filedata.length);                 tmpfilestream.close(); 

this code creating path while opening file excel work book. throwing exception access denied. how can create temporary file path in service fabric , how can access. please me. there anyway opening ms excel file stream?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -