“初始化失败”同时从Open XML生成excel文件 [英] "Initialization failed" while genratating excel file from Open XML

查看:117
本文介绍了“初始化失败”同时从Open XML生成excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI专家,



在我的代码中,我使用OpenXml创建excel文件,在本地环境中它工作正常(即使是大数据)但是当我生成相同的文件时在生产文件时,当excel数据超过100 KB时,它会给出类似初始化失败的错误。



我在网上搜索并获得使用IsolatedStorage的解决方案,但我无法找到如何在Godaddy服务器上启用IsolateStorage。



请从这个问题中找出方法。我正在使用Godaddy服务器。



高级中的Thanx

HI experts,

In my code I am creating excel file using OpenXml, in local environment it works fine(even with large data) but when I generate same file on production it gives me error like "Initialization failed" when excel data more than 100 KBs.

I searched on net and get solution like using IsolatedStorage but I am unable to find that how to enables IsolateStorage on Godaddy Server.

Please give a way come out from this issue. I am using Godaddy Server.

Thanx in Advanced

推荐答案

我不能100%肯定,你真的没有提供太多信息,但我相信你的解决方案没有使用IsolatedStorage,你会发现你的问题(初始化失败)由于它而发生。

很遗憾你没有对此进行控制,OpenXML SDK使用System.IO.Packaging命名空间,其行为方式是当使用大于某个阈值大小的文件进行操作时,它将开始使用IsolatedStorage使用用户/域存储作为暂存区域。要访问IsolatedStorage,您的代码必须具有必要的权限,否则它将失败。



此外,您还应阅读以下Eric White帖子:

< a href =http://openxmldeveloper.org/discussions/formats/f/14/p/7288/162499.aspx#162537> http://openxmldeveloper.org/discussions/formats/f/14/p/7288 /162499.aspx#162537 [ ^ ]
Hi, I cannot be 100% sure, you really did not provide much information, but I believe your solution is not using the IsolatedStorage, you see your issue ("Initialization failed") occurs due to it.
Unfortunately you don't have a control over this, the OpenXML SDK uses System.IO.Packaging namespace which behaves in a way that when manipulating with the file that is bigger than some threshold size then it will begin to use IsolatedStorage using a user/domain store as a scratch pad area. To access IsolatedStorage your code must have the necessary privileges otherwise it will fail.

Also you should read the following Eric White post:
http://openxmldeveloper.org/discussions/formats/f/14/p/7288/162499.aspx#162537[^]


这篇关于“初始化失败”同时从Open XML生成excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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