Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试通过 QtActive 的 QAxObject 将值放入 excel 表中。我成功地拿到了一张工作表。现在为单元格设置值的 win32 API 是
Some_Excel_Object xx=worksheet->Cells(); xx->item[row][column] = 5;
在这里,我得到了“xx”。但是,我不知道如何实现上面的第二行。我将非常感谢阐明这个问题的人。
在 Qt 中,我们可以使用以下代码来实现。
int rowRange = 1; int colRange = 1; QString values = "Test"; QAxObject * range = temp_Worksheet->querySubObject("Cells(int,int)",rowRange,colRange); range->setProperty("Value",values);
尝试这个 !!祝你好运 !!