C程序读取Excel文件 [英] C program to read excel file
本文介绍了C程序读取Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以创建一个C程序来读取excel文件?
Is there any way to create a C program to read excel file?
推荐答案
是否可以创建一个C程序来读取excel文件? ?
是的!
现在,既然您知道可以,那么希望您尝试执行此操作时会遇到问题.
Is there any way to create a C program to read excel file?
Yes!
Now, since you know it can be, we hope you will be back with an issue when you try to do the same.
尝试以下操作: ^ ]
在第4列第10行中输入一个值:
Try this: DispHelper[^]
Put a value into column 4 row 10:
dhPutValue(xlSheet, L".Cells(%d,%d) = %s", 10, 4, szCellText);
Excel公开了COM API,因此您可以从C中使用它. ,这将是一个非常困难的任务.从C ++甚至C#(通过互操作)执行此操作会容易得多.
-------
你猜怎么着?事实证明,Excel具有C API(无需执行COM路由).
请参阅 http://msdn.microsoft.com/en-us/library/bb687829.aspx [ ^ ]
---------
快速阅读表明,编写更快的功能可能更多,因此它可能不是独立的.因此,尽管可以使用它,但您可能仍需要使用COM.
Excel exposes a COM API, so you could use that from C. But unelss your COM skills are exceptionally good, it will be a very difficult task. It would be far easier to do this from C++ or even C# (via interop).
-------
Guess what? Turns out Excel has a C API (no need to go the COM route).
See http://msdn.microsoft.com/en-us/library/bb687829.aspx[^]
---------
A quick read indicates that maybe it''s more for writing faster functions, so it''s probably not stand-alone. So while you can use that, you''d probably still need to use COM.
这篇关于C程序读取Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文