我無法上傳Excel文件到AppHarbor,然後打開它,即使它在本地正常工作。我將文件上傳到App_Data,並將AppHarbor設置設置爲寫入文件目錄。其實上傳OK(我認爲),但是當我嘗試使用Excel的dll文件:無法在AppHarbor上使用Excel dll
var excel = new Application();
它生成此錯誤:
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
我必須Microsoft.Office.Interop參考.Excel在我的項目中,甚至嘗試在本地複製它並在那裏引用它。有任何想法嗎?
Excel是否安裝在AppHarbor?我猜不是,因爲MS特別建議不要這樣做...... –
Excel未安裝在AppHarbor應用程序服務器上。 – friism