EPPlus保存文件会引发NULL参考异常 [英] EPPlus Saving file throws NULL reference exception

查看:218
本文介绍了EPPlus保存文件会引发NULL参考异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

保存包含(甚至为空)数据透视表的Excel文件时,将导致空引用异常",而没有任何有用的消息.

Saving Excel file that contains (even an empty) pivot table results in "Null Reference Exception" without any helpful message.

下面显示显示异常消息的图像.

The image that shows the exception message is here below.

推荐答案

如果使用EPPlus创建数据透视表,请确保所有列均具有标题(该列的命名为第一行) ).头文件丢失会在尝试保存文件时导致空引用异常",即使该应用程序的所有其余部分都可以正常运行.真是恶魔.

If you create pivot tables with EPPlus, make sure all your columns have headers (naming of the column as first row). Missing headers result in "null reference exception" when trying to save the file, even though all the rest of the application is perfectly functioning. What a devil.

这篇关于EPPlus保存文件会引发NULL参考异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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