将纯文本保存到doc文件中 [英] saving plain text into doc file

查看:70
本文介绍了将纯文本保存到doc文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好每一个人.....



我有一个情况.....我有一个字符串..所以我需要将该文本转换为doc文件然后将其转换为二进制格式,最后将该二进制格式保存在数据库中....此过程需要在backgrond中完成....

Hello every one.....

I have a situation..... i have a string.. so i need to convert that text into doc file then convert that into binary format and finally save that binary format in database.... this procees needs to be done in backgrond....

推荐答案

总而言之,如果您的意思是Microsoft Word .doc,那么您谈论的是过时的格式(而不是.docx)。此外,Word .doc文档不适合Web应用程序,因为这是一种专有格式。但是,这些文件通常由Web应用程序使用;这是错的,但现实生活才是现实生活。



现在,该怎么办?以下是您在特定情况下可以执行的操作:编写常规文本文件并将其命名为something.doc。从Word应用程序的角度来看,文本文件足够二进制:-)(你知道一切都是二进制的吗?:-))。这样的结果是Word的合法文本文档,它将被正确打开和使用。听起来很奇怪,但确实如此。不要让事情变得比以前更复杂。



-SA
First of all, if you mean Microsoft Word .doc, you are talking about obsolete format (as opposed to .docx). Besides, Word .doc documents do not fit Web applications well, as this is a proprietary format. However, such files are often used by Web applications; it''s just wrong, but real life is real life.

Now, what to do? Here is what you can do in your particular case: write a regular text file and name it "something.doc". A text file, from the standpoint of the Word application, is "binary" enough :-) (did you know that everything is binary? :-)). The result of this is quite a legitimate text document for Word, it will be correctly opened and used. Sounds weird, but true. Don''t make things more complex than they have to be.

—SA






我没有给你现成的解决方案,我建议你一个容易实现的过程。你必须先帮助自己。



只需将字符串直接转换为二进制,然后就可以轻松将其保存在数据库中......



:-)







Asp.Net/C#.Net帮助博客 [ ^ ]

Hemant Singh Rautela
Hi,

I am not giving you ready-made solution, I suggest you a process which can be easily achievable.You have to help yourself first.

"Just Convert Directly String to Binary, and then you can easily save it in database.... "

:-)



Asp.Net/C#.Net Help Blog[^]
Hemant Singh Rautela


这篇关于将纯文本保存到doc文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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