I’m trying to use Excel COM interoperability to read and write Excel files. When I’m editing in Visual Studio I can add a reference to Microsoft Excel 14.0 Object Library so I can use using Excel = Microsoft.Office.Interop.Excel;. But of course, Unity itself needs to access the library, and I don’t want to manually copy the DLL (bad practice). The library is in the Global Assembly Cache, so is there some way to get Unity to see/use it?
1 Answer
1you can use Uni-Excel Package for Read, Write, and edit excel files
Well, first off, that will only work in Windows if it does work, so your project cannot be multiplatform with this method. Second, the Microsoft Office Interop packages require Microsoft Office to be installed. Even in WinForms, if it's not installed, the app will crash when it tries to access interop. From the docs I've looked at, it seems the only way to import it would be to include the DLL in your project folder though.
– FortisVenaliter