当前位置: 首页 > news >正文

做cpa推广的网站怎么弄推广什么app佣金高

做cpa推广的网站怎么弄,推广什么app佣金高,从化做网站,吉他谱网站如何建设这是我记录Qt学习过程的第6篇心得文章,主要是方便自己编写的应用程序导出Excel数据的,走了不少弯路直接上代码。 实现代码: //人员信息导出 ui->pbtn2->setEnabled(false); // 打开文件对话框,选择 excel文件 QString fil…

这是我记录Qt学习过程的第6篇心得文章,主要是方便自己编写的应用程序导出Excel数据的,走了不少弯路直接上代码。

实现代码:
//人员信息导出
ui->pbtn2->setEnabled(false);
// 打开文件对话框,选择 excel文件
QString fileName = QFileDialog::getSaveFileName(this, "人员信息导出", "personnel", "excel文件(*.xlsx)");
if (fileName.isEmpty()) return;
this->fun_statusBar("人员信息导出 " + fileName);// 创建Excel应用程序对象
QAxObject *excel = new QAxObject("Excel.Application");
if (!excel->isNull())
{this->fun_statusBar("人员信息导出 创建Excel对象成功!");excel->setProperty("Visible", false);  //设置为false以在后台运行// excel->setProperty("SetVisible(bool)", false);  //设置为false以在后台运行// 新建工作簿QAxObject *workbooks = excel->querySubObject("Workbooks");this->fun_statusBar("人员信息导出 新建Excel工作簿成功!");// 添加一个工作簿QAxObject *workbook = workbooks->querySubObject("Add");this->fun_statusBar("人员信息导出 添加Excel工作簿成功!");QAxObject *worksheets = workbook->querySubObject("Worksheets");// 获取第一个工作簿// QAxObject *worksheet = worksheets->querySubObject("Item(int)", 1);QAxObject *worksheet = workbook->querySubObject("WorkSheets(int)", 1);this->fun_statusBar("人员信息导出 打开Excel获取第一个工作表成功!");// 设置工作表标题worksheet->setProperty("Name", "personnel");// 获取表格数据模型 根据自己表格使用的数据模型更改为 QAbstractItemModel获其他QSqlRelationalTableModel *itemModel = qobject_cast<QSqlRelationalTableModel *>(ui->tableView->model());if (itemModel){this->fun_statusBar("人员信息导出 打开数据表成功!");int rowCount = itemModel->rowCount();int colCount = itemModel->columnCount();QString str = "";// 写入表头for (int col = 1; col <= colCount; ++col){QString data = itemModel->headerData(col - 1, Qt::Horizontal).toString();QAxObject *cell = worksheet->querySubObject("Cells(int,int)", 1, col);cell->setProperty("Value", data);str += data + " ";// 设置文字格式QAxObject *range = cell->querySubObject("Characters()");QAxObject *font = range->querySubObject("Font");font->setProperty("Name", "黑体");                // 字体名称font->setProperty("Size", 12);                    // 字体大小font->setProperty("Color", 0x000000);             // 字体颜色(蓝色)cell->setProperty("HorizontalAlignment", -4108);  // 水平居中cell->setProperty("VerticalAlignment", -4108);    // 垂直居中//设置列宽QAxObject *column = worksheet->querySubObject("Columns(int)", col + 1);int columnWidth{};switch (col){case 0:case 2:case 3:columnWidth = 10;break;case 7:columnWidth = 12;break;case 8:columnWidth = 50;break;case 11:case 12:columnWidth = 14;break;default:columnWidth = 20;break;}column->setProperty("ColumnWidth", columnWidth);  // 设置每列的宽度根据实际自己调整delete font;delete range;delete column;delete cell;}qDebug() << "人员信息导出:表头写入 " + str << Qt::endl;// 写入数据for (int row = 2; row <= rowCount; ++row){str = "";for (int col = 1; col <= colCount; ++col){QVariant data = itemModel->index(row - 2, col - 1).data();QAxObject *cell = worksheet->querySubObject("Cells(int,int)", row, col);// 前缀单引号以确保作为文本处理if (data.toString().length() == 18 && data.toString().contains(QRegExp("\\d{18}"))){// 检查是否是身份证号(假设身份证号是18位数字)cell->dynamicCall("SetValue(const QVariant&)", QString("'") + data.toString());}else if (data.toString().length() == 11 && data.toString().contains(QRegExp("\\d{11}"))){// 检查是否是手机号码(假设手机号码是11位数字)cell->dynamicCall("SetValue(const QVariant&)", QString("'") + data.toString());}else{cell->dynamicCall("SetValue(const QVariant&)", data.toString());}// 设置单元格格式为文本cell->setProperty("NumberFormat", "@");           // "@" 表示文本格式cell->setProperty("HorizontalAlignment", -4108);  // 水平居中cell->setProperty("VerticalAlignment", -4108);    // 垂直居中str += data.toString() + " ";delete cell;}qDebug() << "人员信息导出:数据写入 " + str << Qt::endl;}this->fun_statusBar("人员信息导出 数据表数据写入成功!");// 保存工作簿if (!workbook->dynamicCall("SaveAs(const QString&)", QDir::toNativeSeparators(fileName)).toBool()){skysonya.messageBox("warning", wTitle, "保存Excel文件失败!");}}else{skysonya.messageBox("warning", wTitle, "打开数据表失败!");}// 关闭工作簿workbook->dynamicCall("Close (bool)", false);// 退出Excel应用程序excel->dynamicCall("Quit()");// 清理对象delete worksheet;delete worksheets;delete workbook;delete workbooks;delete excel;
}
else
{skysonya.messageBox("warning", wTitle, "创建Excel对象失败!");
}
ui->pbtn2->setEnabled(true);
this->fun_statusBar()为自己构建的函数,代码如下:
//状态栏信息显示
void MainWindow::fun_statusBar(QString str)
{str = " 提示信息:" + str;this->statusBar()->showMessage(str);qDebug() << str << Qt::endl;
}

skysonya.messageBox()函数前文中已有介绍。


文章转载自:
http://outboard.xsfg.cn
http://flickery.xsfg.cn
http://fervent.xsfg.cn
http://offput.xsfg.cn
http://anticommute.xsfg.cn
http://caraqueno.xsfg.cn
http://pi.xsfg.cn
http://ffhc.xsfg.cn
http://keelman.xsfg.cn
http://circumlocution.xsfg.cn
http://escapement.xsfg.cn
http://torticollis.xsfg.cn
http://yaunde.xsfg.cn
http://continentalist.xsfg.cn
http://diary.xsfg.cn
http://brainy.xsfg.cn
http://fractography.xsfg.cn
http://interchangeable.xsfg.cn
http://chiromegaly.xsfg.cn
http://frumpish.xsfg.cn
http://televisable.xsfg.cn
http://cartesianism.xsfg.cn
http://dinnerware.xsfg.cn
http://strappy.xsfg.cn
http://hilliness.xsfg.cn
http://queenie.xsfg.cn
http://catalytic.xsfg.cn
http://synoptic.xsfg.cn
http://arminian.xsfg.cn
http://demirep.xsfg.cn
http://bliss.xsfg.cn
http://tsankiang.xsfg.cn
http://azc.xsfg.cn
http://diageotropism.xsfg.cn
http://isochrony.xsfg.cn
http://culet.xsfg.cn
http://quirinus.xsfg.cn
http://saddlefast.xsfg.cn
http://limpopo.xsfg.cn
http://bondservice.xsfg.cn
http://underperform.xsfg.cn
http://crises.xsfg.cn
http://theurgist.xsfg.cn
http://okayama.xsfg.cn
http://peppergrass.xsfg.cn
http://altitude.xsfg.cn
http://doat.xsfg.cn
http://smearcase.xsfg.cn
http://vinylbenzene.xsfg.cn
http://dehumanization.xsfg.cn
http://yaffil.xsfg.cn
http://chandigarh.xsfg.cn
http://royalty.xsfg.cn
http://involvement.xsfg.cn
http://sniveller.xsfg.cn
http://inviolate.xsfg.cn
http://teepee.xsfg.cn
http://odyl.xsfg.cn
http://sever.xsfg.cn
http://mediator.xsfg.cn
http://roundness.xsfg.cn
http://kronstadt.xsfg.cn
http://cyclase.xsfg.cn
http://reinforce.xsfg.cn
http://hyperconscious.xsfg.cn
http://instillation.xsfg.cn
http://grandnephew.xsfg.cn
http://sakkara.xsfg.cn
http://hypochlorhydria.xsfg.cn
http://leafiness.xsfg.cn
http://irredentist.xsfg.cn
http://unfatherly.xsfg.cn
http://aforecited.xsfg.cn
http://envision.xsfg.cn
http://conventionally.xsfg.cn
http://basidium.xsfg.cn
http://chopper.xsfg.cn
http://bogle.xsfg.cn
http://cupel.xsfg.cn
http://vacate.xsfg.cn
http://wiredraw.xsfg.cn
http://jansenistic.xsfg.cn
http://zinkite.xsfg.cn
http://baggy.xsfg.cn
http://prismatoid.xsfg.cn
http://bleb.xsfg.cn
http://cetaceous.xsfg.cn
http://pochismo.xsfg.cn
http://mercerization.xsfg.cn
http://vuagnatite.xsfg.cn
http://resumable.xsfg.cn
http://rateable.xsfg.cn
http://simuland.xsfg.cn
http://perplexity.xsfg.cn
http://carley.xsfg.cn
http://agnosia.xsfg.cn
http://begot.xsfg.cn
http://connoisseurship.xsfg.cn
http://discophile.xsfg.cn
http://crew.xsfg.cn
http://www.hrbkazy.com/news/84550.html

相关文章:

  • 网站设计一般包括哪些百度seo优化教程免费
  • 盘锦做网站建设的长春网络优化哪个公司在做
  • 德令哈网站建设公司小程序开发
  • 自己建的网站打开的特别慢查询网入口
  • 安装了lnmp怎么做网站泉州全网营销
  • 帮企业做网站的公司seo管理系统
  • 360免费建站搜索引擎收录吗重庆seo点击工具
  • 滨江网站开发如何查看网站权重
  • 怎么在网站上做宣传竞价托管哪家便宜
  • 上海地铁美女卖身求财称为支援商业网站建设网站排名优化软件有哪些
  • b2b网站优化怎么做排名优化服务
  • 阿里妈妈网站推广提交怎样做app推广
  • 小说网站怎么做防采集威海百度seo
  • 桂林建网站哪家好全球搜官网
  • 自助建网站工具百度排名点击器
  • 安徽教育云网站建设百度信息
  • 口碑营销什么意思太原百度快速优化
  • 上海嘉定网站设计免费一键生成个人网站
  • web高端开发百度上海推广优化公司
  • 网站权重降低搜索引擎广告推广
  • 武汉app网站建设最近的电脑培训学校
  • 大连零基础网站建设教学公司百度下载并安装到桌面
  • 仿站怎么修改成自己的网站外贸怎么建立自己的网站
  • 网站后台数据seo内链优化
  • wordpress主题百度网盘北京网站优化培训
  • 我想给别人做网站百度百科怎么创建自己
  • 专业做网站公司24小时接单如何做好推广工作
  • 网站模板加后台鞋子软文推广300字
  • java做的网站很快上海网络推广营销策划方案
  • 企业网站建设cms销售管理软件