The document types produced from the latest versions of Microsoft Office (those which have an x
at the end, such as .docx
, .xlsx
, .pptx
, etc) are actually saved according to the OpenXML
standard, which is fairly well documented. I mention that because it will be helpful to you in searching for further help in reading and parsing the document formats for your application(s).
That said, it sounds like you're looking for a standard library with which you can read and manipulate these kinds of documents from Objective-C.
An discussion with examples of how to do this using the OpenXML SDK 2.0 can be found here. As an exerpt:
using (WordprocessingDocument document = WordprocessingDocument.Open(fileName, false))
{
int pageCount = (int) document.ExtendedFilePropertiesPart.Properties.Pages.Text;
}
A tutorial for using the OpenXML SDK from Objective-C can be found here (though the images from the article appear to be broken). The tutorial bases its code on the GData Objective-C Client found on Google Code.
You might also refer to this SO Question and it's answer, which refers to the open-source library libOPC, the web-page for which gives examples of how to build Word Document manipulation in an iPhone app.
Unfortunately, none of these resources are likely to assist you in reading an old-format .doc
file, which is in a far more proprietary Microsoft format. So - I'm hoping that isn't what you need to do. Either way, I hope these resources help! Let us know if you get it working.