Excel-需要C#帮助 [英] Excel - C# help needed

查看:84
本文介绍了Excel-需要C#帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个使用Microsoft.Office.Interop.Excel版本11.0、12.0的程序.

该软件在带有Windows XP,Vista,7、32和64位的PC/笔记本电脑上均能正常工作

但是在装有Windows 7、64位系统的平板电脑上出现问题

该软件是使用Visual Studio 2008,.Net 3.5制作的.

客户端在平板电脑上安装了.Net 305

看来软件没有从excel文件中读取电子表格数据(行,cloumns)

希望能为您提供帮助.

i made a program which uses Microsoft.Office.Interop.Excel version 11.0, 12.0

the software works fine on PC/laptops with windows xp, vista, 7, both 32 and 64 bit

but it is doing a problem on tablet with windows 7, 64 bit system

the software was made using visual studio 2008, .Net 3.5

client has .Net 305 installed on the tablet

what it appears that software is not reading spreadsheet data(rows, cloumns) from the excel file

hoping for ur kind help

推荐答案

如果您不要向我们展示您正在使用的代码,我们无法告诉您您的鳕鱼为什么不起作用.

以下是一些以前遇到过此问题的人:
http://social.msdn.microsoft.com/论坛/en-US/netfx64bit/thread/338bb030-98d6-4b97-a182-562d985395d9 [ http://social.msdn.microsoft.com/Forums/zh/exceldev/thread/500e8851-e7bd-47da-9eac-4233bebd8e5a [ http://msdn.microsoft.com/en-us/library/15s06t57.aspx [ ^ ]

您应该能够解决您的问题.只需构建两个版本的软件,一个版本用于32位,一个版本用于64位(这在许多程序中很常见),您就可以自由上班了.您还可以尝试其他方法,请参见链接.
We cant tell why your cod isnt working if you dont show us the code that you are using.

Here are some people hat have encountered the problem before:
http://social.msdn.microsoft.com/Forums/en-US/netfx64bit/thread/338bb030-98d6-4b97-a182-562d985395d9[^]
http://social.msdn.microsoft.com/Forums/en/exceldev/thread/500e8851-e7bd-47da-9eac-4233bebd8e5a[^]
http://msdn.microsoft.com/en-us/library/15s06t57.aspx[^]

You should be able to resolv your issue. Just build two versions of your softeware, one for 32 bit and one for 64 bit (this is common in many programs) and you would be home free. There are other things you could try first though, please see the links.


我的两分钱:

1.切勿使用Office Interop程序集,因为它会严重依赖MS Office安装,而没有Office安装的Interop无法正常工作.
2.64位平台上存在问题.


到目前为止,我已经看过一个漂亮的图书馆,这对您有帮助.
http://exceldatareader.codeplex.com/
上面的库对Microsoft Excel的依赖性为零,您可以自由部署应用程序而无需对Excel安装的依赖性.

再次将您的应用设置为特定于x86,然后将其部署在64位计算机上.


谢谢,

Kuthuparakkal

您好,对此回复

我有一个问题,也许你可以回答
我用C#编写了一个程序,可以读取Excel文件.它使用Microsoft.Office.Interop.Excel命名空间

该软件在所有PC上均能正常运行,但不适用于Windows 7的64位平板电脑

它不会显示任何错误,它甚至不会从excel文件中读取任何一行

上面的解决方案能解决问题吗?
My two cents:

1. Never go with Office Interop assemblies as it creates huge dependancy on MS Office Installation, without the office installed Interop doesn''t work.
2.There are issues on 64 bit platform.


This would help you, a beautiful library I have seen so far.
http://exceldatareader.codeplex.com/
The above library has zero dependancy on Microsoft Excel, you can deploy your app freely without the huge dependancy on Excel installation.

Again set your app to x86 specific and then deploy it on 64 bit machines.


Thanks,

Kuthuparakkal

hy kindly reply to this

i have once question, may be u can answer
i made a program in c#, which reads excel files. it uses Microsoft.Office.Interop.Excel namespace

software is working fine in all pc, but its not working on 64 bit tablet with windows 7

it doesnt show any error, it just doesnt read even a single row from the excel file

so does the above solution will solve problem?


这篇关于Excel-需要C#帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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