Workbook excelWorkBook = (missingValue) Application excelApp = new Excel.Application() => COM => Microsoft Office 16.0 Object Library Right click your project => Add => Reference. Add the Com reference "Microsoft Office 16.0 Object Library". You can do this by right clicking your project in Visual Studio, select add and select Reference. So the code below is all you need to create an excel with a picture in C#, in combination with adding the Com reference Microsoft Office 16.0 Object Library from the Reference Manager. NOTE: This requires you to have Microsoft Office on your computer and on your production and build environments. And by using the Microsoft library to create your excel file, you can add rows and columns really easy aswell. If you use the correct tools! By using Microsoft Office 16.0 Object Library you can add a image to your excel file with 1 simple line. So how do you create an excel file with a picture in C#? It is a actually fairly simple.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |