| | |
| | | } |
| | | //wb->dynamicCall("Save()"); // 若文件已存在,则直接保存 |
| | | //wb->dynamicCall("SaveAs(const QString&)", str); // 保存工作簿,若文件不存在,则带名字保存 |
| | | if(ui->lineEdit_excel_save->text() > 1){ |
| | | if(ui->lineEdit_excel_save->text().size() > 1){ |
| | | wb->dynamicCall("SaveAs(const QString&)", ui->lineEdit_excel_save->text()); // 保存工作簿,若文件不存在,则带名字保存 |
| | | qDebug()<<"保存到新文件中"; |
| | | }else{ |
| | |
| | | void SearchInfo::on_comboBox_currentIndexChanged(const QString &arg1) |
| | | { |
| | | m_model->setHorizontalHeaderLabels(m_labels[arg1]); |
| | | |
| | | } |
| | | |
| | | void SearchInfo::on_toolButton_seleceExcel_clicked() |
| | |
| | | QString newPath = paths.at(0)+"_"+ui->comboBox_company->currentText()+"."+paths.at(1); |
| | | ui->lineEdit_excel_save->setText(newPath); |
| | | } |
| | | |
| | | void SearchInfo::on_comboBox_company_currentIndexChanged(const QString &arg1) |
| | | { |
| | | if(ui->lineEdit_excel_save->text().size() > 5){ |
| | | QStringList paths = ui->label_excel_path->text().split("."); |
| | | QString newPath = paths.at(0)+"_"+arg1+"."+paths.at(1); |
| | | ui->lineEdit_excel_save->setText(newPath); |
| | | } |
| | | } |
| | | |
| | | void SearchInfo::addComName(QString name) |
| | | { |
| | | ui->comboBox_company->addItem(name); |
| | | } |