Visual Studio程序破坏Excel应用程序

编程入门 行业动态 更新时间:2024-10-07 14:31:19
本文介绍了Visual Studio程序破坏Excel应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在运行一个可视工作室程序来控制一套实验室测试设备。我正在从网络分析仪请求数据并将数据记录到Excel文件中(Excel 2013)。每次运行程序时,excel应用程序都会生成灰色屏幕而没有任何显示的数据。在我停止程序后,我可以在Apps& amp;功能菜单。当我运行修复并重新启动计算机时,文件会正常打开并显示预期的数据。我希望能够运行程序而无需每次都修复办公室。我在visual C#中使用excel互操作服务来创建excel应用程序和日志数据。还有其他人遇到过这个问题吗?任何信息都会非常感激。

I am running a visual studio program to control a set laboratory test equipment. I am requesting data from a network analyzer and logging the data into an excel file (Excel 2013). Every time I run the program, the excel application results in a grey screen without any displayed data. After I stop the program I can repair Microsoft Office in the Apps & Features menu. When I run the repair and restart the computer, the file opens normally with the expected data displayed. I want to be able to run the program without having to repair office every time. I am using excel interop servicesin visual C# to create the excel application and log data. Has anyone else ran into this issue? Any information would be much appreciated.

推荐答案

我之前遇到过使用互操作的问题。您是否考虑过使用 EPPlus 。它使用OOXML创建Excel文件。您在机器上不需要Excel。它易于使用,可以创建图表。有一个.Net Core 2.0的版本,所以如果需要你可以在Linux上运行它。 $

I've had problems previously with interops. Have you considered using EPPlus. It uses OOXML to create the Excel file. You don't need Excel on the machine. It is easy to use and can create graphs. There is a version for .Net Core 2.0 so if needed you can run it on Linux.

我打算将它用于项目,但我需要汇总PDF报告。我使用C#并将所有数据存储在SqLite数据库中。然后我编写了一个VBA插件(.xlsm),用于从db创建报告。通过VBA,我能够使用复杂的图表和数据透视表创建报告。

I was going to use it for a project but I needed summary PDF reports. I used C# and stored all the data in an SqLite database. I then wrote a VBA addin (.xlsm) that creates reports from db. With VBA I was able to create reports with complex graphs and pivot tables.

更多推荐

Visual Studio程序破坏Excel应用程序

本文发布于:2023-11-13 02:58:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583236.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   程序   Visual   Studio   Excel

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!