Open excel files in asp.net
Reduce the number of steps to a single button click on your web page that generates and opens the Excel document. You can also embed your Office Add-in inside the document and display it when the document opens. This ensures the customer still has access to your application features. When the document opens, the data the customer selected, and your Office Add-in is already available for them to continue working. This article shows you code and techniques for implementing this scenario in your own SaaS web application.
Use the following steps to build and run the sample. The following information is taken from the About the code section in the readme file. If you are setting up an add-in from a file share catalog for auto-open, you will use different values:. For more information about alternative values for these attributes, see Automatically open a task pane with a document. A best practice is to use the Fluent UI to help your users transition between Microsoft products. You should always use an Office icon to indicate which Office application will be launched from your web page.
You'll see the icon appear when the home page loads. We recommend uploading new documents to OneDrive if your customer uses OneDrive. This makes it easier for them to find and work with the documents. Open the graph-tutorial. Add a new scope Files. The web application will start. Open a new browser tab and sign in to your OneDrive account. Cells Product Family Email Product Family Slides Product Family Imaging Product Family BarCode Product Family Diagram Product Family Tasks Product Family OCR Product Family Note Product Family CAD Product Family GIS Product Family ZIP Product Family Page Product Family PSD Product Family Excel to ExcelLibrary.
Workbook an explicit conversion exists are you missing a cast — hud. Sorry, deleted my comment accidentally. You are trying to open file with Microsoft's Excel interop library - the result returned is of type Microsoft.
DmitryRotay: so what's the solution for this? If you really want to use excel interop to open workbook and work with it, then you need to replace the last line with this: Microsoft. Show 5 more comments. Active Oldest Votes. TransmitFile filePath ; Response. End ;. Improve this answer.
Dmitry Rotay Dmitry Rotay 3, 1 1 gold badge 13 13 silver badges 11 11 bronze badges. Happy coding : — hud. Add a comment. Luke Pillar Luke Pillar 1 1 silver badge 4 4 bronze badges. Have you tried just using ExcelLibrary. If I'm understanding your code correctly, that would open the Workbook you created a few lines up.
Show 2 more comments. Sign up or log in Sign up using Google.
0コメント