문제

I am creating an Android App (in eclipse) which I need to create a document - a letter. I'm writing it i xml and I have been able to produce .xml and .doc both of which MSWord will happily open, which is fantatsic but I really need also to be able to open it in the standard Android document readers, such as Kingsoft Office/QuickOffice/OfficePro etc. Unfortunately, these Apps all open it as the xml source which is a hassle to read and edit. The web-based Google document reader also has issues with my docs.

I must be missing something in my markup and I was just wondering if anyone out there knew the markup needed for my Word document (.doc) to be exactly that and thus parse-able by doc readers?

Thanks

도움이 되었습니까?

해결책

.doc files are not XML and won't display as XML. If you are seeing XML then the file is not really a .doc format (even if you are naming it with a .doc extension). If you need to produce .doc format (not just docx) then you have a much harder task. The only thing I can suggest for Android is calling a service like Docmosis that can produce a PDF/DOC etc for you - but it's not free and you need to be connected. For viewing documents on various platforms a possibly better approach is to always display PDF and only use formats like .doc/.docx where editing is required/expected.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top