- Home /
Can I use the Excel Object Library in a C# script in Unity?
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?
Well, first off, that will only work in Windows if it does work, so your project cannot be multiplatform with this method.
Second, the $$anonymous$$icrosoft Office Interop packages require $$anonymous$$icrosoft 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.
Answer by MyUnitydream · Sep 12, 2018 at 05:21 AM
you can use Uni-Excel Package for Read, Write, and edit excel files
Your answer
![](https://koobas.hobune.stream/wayback/20220612082524im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Simplest way to call c# code from Unity and hook events 3 Answers
How do you integrate the EPPlus library into Unity? 2 Answers
Problem with FileStream 1 Answer
30f + 0.5f = 30f What?????? 1 Answer