如何将任何类型的文件转换为字符串? [英] How to convert any type of file to string?

查看:127
本文介绍了如何将任何类型的文件转换为字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将任何类型的文件转换为字符串?

How to convert any type of file to string?

我必须在不同类型的文件.doc,.xls,.pdf,.aspx ...中寻找特定值.

I have to look for a specific value in different type of files .doc, .xls, .pdf, .aspx....

是否存在使用c#将任何扩展文件转换为字符串的代码?

is there a code to convert any extension file to string using c# ?

如果我的帖子解决了您的问题并使用,请使用标记为答案 投票为有帮助如果帖子有用.

Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

推荐答案

你好,

在C#中,没有一个库可以满足您的要求.这将是一个很大的操作,例如考虑.doc是二进制文件,.docx是具有原始文本格式的压缩文件. .pdf,本质上简单而复杂的.pdf可以通过 决策树,从免费图书馆到诸如Aspose for pdf之类的东西.

There is not one library in C# designed for what you are asking. This would be a large operation e.g. consider .doc which is binary, .docx which is a compressed file with a raw format of text. A .pdf, that is simple in nature vs a complex one can move through decision trees from a free library to something say like Aspose for pdf etc.


这篇关于如何将任何类型的文件转换为字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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