DOCX,PPTX and XLSX file preview in Qt
Hi
I am using Qt 4.8.7 Static on Windows Platform. I want to show preview DOCX,PPTX and XLSX file preview.
Is there any way to show preview...I am using following code
Code:
///for Powerpoint
m_pAxDocument->setGeometry(m_pTextEdit->geometry());
m_pAxDocument->setProperty("DisplayAlerts",false);
QAxObject *axObject
= m_pAxDocument
->querySubObject
("Presentations");
QAxObject *present
= axObject
->querySubObject
("Open(const QVariant&)",
QVariant(strFileName
));
for DOCX
Code:
m_pAxDocument
= new QAxWidget("Word.Document",m_pTextEdit
);
m_pAxDocument->setGeometry(m_pTextEdit->geometry());
m_pAxDocument->setProperty("DisplayAlerts",false);
m_pAxDocument->setControl(strFileName))
It show preview but it is editable, it directly open in MS Word or powerpoint and you can do anything with its preview...cut, copy paste.
I want it to make preview using QAxWidget readable only...Is there any method for this...I am also unable to disable the QAxWidget/QTextEdit.. I don't have control on this preview...
Or any other way to show DOCX,PPTX and XLSX file preview in Qt.
Kindly reply..
Thanks
Santosh
Re: DOCX,PPTX and XLSX file preview in Qt
Is there a "setProperty" call for a read-only property?
Re: DOCX,PPTX and XLSX file preview in Qt
I don't know whether readonly property or not. Kindly tell me whether disable qaxwidget or readonly it. I didn't find any documentation regarding preview of office files. I will codetags# after 1 days, I may accessing through mobile.
If anybody know this solution kindly help me.
Thanks for reply.
Re: DOCX,PPTX and XLSX file preview in Qt
If anybody know this solution kindly help me.
Re: DOCX,PPTX and XLSX file preview in Qt
Hi
Anybody know if docx,pptx, xlsx convert into HTML format.
Thanks
Santosh
Re: DOCX,PPTX and XLSX file preview in Qt
Quote:
I don't know whether readonly property or not. Kindly tell me whether disable qaxwidget or readonly it.
QAxWidget is simply a container where ActiveX controls can display their content. It has no concept of "read-only". You need to look at the Microsoft documentation for your ActiveX controls to find out if they support a read-only property on their documents.
Quote:
Anybody know if docx,pptx, xlsx convert into HTML format.
Again, you need to look at the Microsoft documentation. I doubt if you can convert documents in these formats into the subset of HTML that Qt supports; you will almost certainly end up with HTML that cannot be rendered by Qt. You will be much better off if you read the Microsoft ActiveX documentation for these document types and learn how to display them in QAxWidget with a read-only property.