QAxObject* range = worksheet->querySubObject("Cells(int, int)", 1, 1);
QAxObject* pEntireRow = range->querySubObject("EntireRow");
pEntireRow->("AutoFit()");
// 调整之后高度再加10
QVariant vtRH = range->property("RowHeight");
double dRH = vtRH.toDouble();
dRH = dRH + 10.0;
range->setProperty("RowHeight", dRH);
Qt操作Excel--根据内容自动设置高度
最新推荐文章于 2023-02-17 15:06:58 发布