diff --git a/chartsquestions/sat_calc.cpp b/chartsquestions/sat_calc.cpp index ff835ec..cf6d308 100644 --- a/chartsquestions/sat_calc.cpp +++ b/chartsquestions/sat_calc.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "sat_calc.h" @@ -145,17 +146,23 @@ void sat_calc::generate_report() chrom_data_array += ":B" + QString::number(output_line_count - 1); Chart * Crom = output.insertChart( 3, 5, QSize(600, 500) ); - Crom->setChartType( Chart::CT_Scatter ); + Crom->setChartType( Chart::CT_ScatterChart ); Crom->addSeries( CellRange(chrom_data_array) ); - Crom->setAxisTitle( Chart::Left, QString("left title") ); // dev24 - Crom->setAxisTitle( Chart::Bottom, QString("bottom title") ); // dev24 - Crom->setChartTitle( QString("hello chart") ); // dev25 + Crom->setAxisTitle( Chart::Left, QString("left title") ); + Crom->setAxisTitle( Chart::Bottom, QString("bottom title") ); + Crom->setChartTitle( QString("hello chart") ); qDebug() << "[debug] chrom_data_array : " << chrom_data_array; output.saveAs(report_file); input.close(); + Document doc2(report_file); + if (doc2.load()) + { + doc2.saveAs("doc2.xlsx"); + } + QMessageBox msgBox; msgBox.setText("Success to write a xlsx file."); msgBox.exec(); diff --git a/chartsquestions/sat_gui.pro b/chartsquestions/sat_gui.pro index 8880455..c5ee7c4 100644 --- a/chartsquestions/sat_gui.pro +++ b/chartsquestions/sat_gui.pro @@ -2,11 +2,12 @@ # sat_gui.pro # # Copyright (c) 2018 edosad(github) All rights reserved. -# Some code is fixed by j2doll. +# +# Some code is fixed by j2doll(github) -QT += core gui - -# greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +QT += core +QT += gui +QT += widgets TARGET = sat_gui TEMPLATE = app