How to copy rows in excel with activex



  • Hi everyone,

    I am trying to do some excel sheet manipulations with qt's activex framework. I already figured out some basics like setting the value of one cell and saving excel files.

    My problem is I want to copy a range of cells from one sheet to another or to a different location in the same sheet. I have tried different things like:

    object->dynamicCall"SetValue(QVariant)", valueNew);
    

    this only works for a single cell
    or

        QAxObject* range1 = sheet->querySubObject("Range(const QString&, const ]QString&)", QString("A1"), QString("E1"));
        QAxObject* range2 = sheet->querySubObject("Range(const QString&, const QString&)", QString("A6"), QString("E6"));
    

    and then somehow assign the content of range 1 to range2.
    Basically I want to copy for example the content of range1 to range2, preferably including the formating of the cells (border, font and size).
    I hope someone can help me.

    Thanks
    nox


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.