nagabathula
20th June 2011, 05:41
Hello every one.. I am working on a Qt application where i write some data to a Excel file , now i have given a option in Toolbar to view the excel file to which i have written data into. I tried many things looking at the forums but it din help the excel file does not open.
i did the following but does't open up a Excel.
QProcess *process = new QProcess(this);
QString program = "msexcel.exe";
QString folder = "E:/DataReceiver Excel Log/Mon 20-06-2011, 09.01.xls";
process->start(program, QStringList() << folder);
QString folder = "E:/DataReceiver Excel Log/Mon 20-06-2011, 09.01.xls";
process->start(newfilename, QStringList() << "");
QDesktopServices::openUrl(QUrl(tr(newfilename)));
if(!QDesktopServices::openUrl(url)) {
excelview.load(url);
excelview.showMaximized();
}
none of the three above methods worked.. What is it wrong that i am doing. ?
Thank you
i did the following but does't open up a Excel.
QProcess *process = new QProcess(this);
QString program = "msexcel.exe";
QString folder = "E:/DataReceiver Excel Log/Mon 20-06-2011, 09.01.xls";
process->start(program, QStringList() << folder);
QString folder = "E:/DataReceiver Excel Log/Mon 20-06-2011, 09.01.xls";
process->start(newfilename, QStringList() << "");
QDesktopServices::openUrl(QUrl(tr(newfilename)));
if(!QDesktopServices::openUrl(url)) {
excelview.load(url);
excelview.showMaximized();
}
none of the three above methods worked.. What is it wrong that i am doing. ?
Thank you