支持xls,xlsx,ppt,pptx,doc,docx这6种文本的获取操作,程序采用c++语言编写,dll封装,只需要调用单独的接口就可以获取文本拼接的字符串,使用实例如下所示:
int main()
{
string fileName = "C:\\Users\\14713\\Desktop\\1.docx";
officeFactory *com = new officeFactory();
IOfficeFile *office = com->CreateOfficeFile(fileName);
string ss = office->ParagraphText();
ERRORTYPE result = office->getResult();
ofstream stream("C:\\Users\\14713\\Desktop\\4.txt");
stream << ss;
stream.close();
getchar();
return 0;
}