开发者

How to write a MsWord (.doc) file in Objective C?

开发者 https://www.devze.com 2023-01-07 15:58 出处:网络
I need to write pure Msword file in objective C. I have been writing .txt 开发者_如何学Cfile till now but when i write a .doc file i\'m facing encoding issues with all encoding schemes.

I need to write pure Msword file in objective C. I have been writing .txt 开发者_如何学Cfile till now but when i write a .doc file i'm facing encoding issues with all encoding schemes. Microsoft provide library in visual studio to play with .doc files which is not available in Xcode. So is there any way to make it happen?


You can extract the code from e.g. OpenOffice project. This is C++ code, but you can use a wrapper around. This will be a lot of work.


If it's an option for you: On the server use Microsft VSTO to create a document (doc,els,ppt...) using ServerDocument class and passing the data that you collect on the client. Then you download that file and your phone.


Sounds like you are trying to port MS word. Basically u need to write XML files and zip them in a particular manner. Check out the markup specification here http://msdn.microsoft.com/en-us/library/cc313105%28office.12%29.aspx


if it's .docx, you may compose an XML file and rename it. With .doc you may have to do it with your own wrapper.

0

精彩评论

暂无评论...
验证码 换一张
取 消