C # code errors related to Excel file

eliiii 1 Reputation point
2022-01-30T10:39:19.983+00:00

Hello
I have C # code in visual studio which is related to some Excel files and is written on another system. I want to connect the N169549-capture.jpgawisworks 3D model on my system with an API, but the code on my system that opened had errors. Please help me how can I fix these problems?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,164 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2022-01-30T12:43:40.073+00:00

    Some of your code looks like it has unicode characters in the ide. (\ue003) so you will have to fix the code manually. As for office interop I would avoid it. The computer you are running the app does not have same version of office it might not work properly. I would recommend using something like openxmlsdk or npoi instead. They allow you to create excel files without needing excel installed

    https://github.com/nissl-lab/npoi/wiki/Getting-Started-with-NPOI

    https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk

    0 comments No comments