Results 1 to 3 of 3

Thread: Excel range will crash once i get the values

  1. #1
    Join Date
    Jun 2010
    Posts
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default Excel range will crash once i get the values

    hi,
    reading single cells from excel is fine but reading a range causes problems.
    this code is fine:
    Qt Code:
    1. QAxObject *range = sheet->querySubObject("Range(QString)", "A4:A5");
    To copy to clipboard, switch view to plain text mode 
    but calling this afterwards:
    Qt Code:
    1. QVariant v = range->dynamicCall("Value()");
    To copy to clipboard, switch view to plain text mode 
    will give me a heap corruption

    this will fix it but will result in memory leaks:
    Qt Code:
    1. QVariant *v2 = new QVariant(v);
    To copy to clipboard, switch view to plain text mode 
    deleting v2 will again result in heap corruption

    anyone knows why ?
    BTW: cell values: A4 = 0 and A5 = 1

  2. #2
    Join Date
    Jun 2010
    Posts
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Excel range will crash once i get the values

    i finally found out myself
    i am using Visual Studio 2010 Express
    changing the "platform toolsets" from "v100" to "v90" has fixed my heap corruptions

  3. #3
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Excel range will crash once i get the values


Similar Threads

  1. QDoubleVlaidator range
    By johnmauer in forum Qt Programming
    Replies: 1
    Last Post: 20th October 2010, 16:08
  2. Out of range detection
    By zgulser in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2009, 09:32
  3. Index out of Range
    By santhoshv84 in forum Qt Programming
    Replies: 2
    Last Post: 19th August 2008, 15:33
  4. Replies: 3
    Last Post: 12th June 2008, 11:59
  5. QLineEdit set min max range?
    By whitefurrows in forum Qt Programming
    Replies: 29
    Last Post: 10th June 2006, 23:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.