Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to copy rows in excel with activex
QtWS25 Last Chance

How to copy rows in excel with activex

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 429 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nox_z
    wrote on last edited by nox_z
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved