我们可以在Azure功能中使用Microsoft.Office.Interop.excel.dll吗? [英] Can we use Microsoft.Office.Interop.excel.dll in Azure funtions?

查看:87
本文介绍了我们可以在Azure功能中使用Microsoft.Office.Interop.excel.dll吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想使用Azure函数中的Microsoft.Office.Interop.excel.dll将数据表中的数据导出到Excel.我已经在azure函数内部的wwwroot中添加了dll,并添加了具有dll依赖关系的project.json.这是我的问题.

I want to export data from data table to Excel using Microsoft.Office.Interop.excel.dll in azure functions. I have added the dll in wwwroot inside the azure functions as well I've added the project.json with the dll depencies. Here is my issue. 

执行函数时发生异常:Functions.TimerTriggerCSharp1. Microsoft.Azure.WebJobs.Script:发生一个或多个错误. f-TimerTriggerCSharp1 __- 1571765013:无法加载文件或程序集'办公室,版本= 14.0.0.0,区域性=中性,PublicKeyToken = 71e9bce111e9429c' 或其依赖项之一.系统找不到指定的文件.

Exception while executing function: Functions.TimerTriggerCSharp1. Microsoft.Azure.WebJobs.Script: One or more errors occurred. f-TimerTriggerCSharp1__-1571765013: Could not load file or assembly 'office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

使用过:

#r "Microsoft.Office.Interop.Excel.dll"

推荐答案

卡维娅,

删除#R语句中的.dll

Remove the .dll in #R statement

#r

#r "Microsoft.Office.Interop.Excel"

使用 Microsoft.Office.Interop.Excel ;

using Microsoft.Office.Interop.Excel;

看看是否有效


这篇关于我们可以在Azure功能中使用Microsoft.Office.Interop.excel.dll吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆