<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QAxObject writing cell more than column 16600 crashing application]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">It's too wired working of QAxObject,<br />
Whenever I tried to access cell more 16600 its crashing the application, where writing between this range working fine.</p>
<p dir="auto">I have debug it writing directly like this:</p>
<pre><code>  QAxObject* excel = new QAxObject( "Excel.Application", 0);
  excel-&gt;setProperty( "DisplayAlerts", 0);

  excel-&gt;dynamicCall("SetScreenUpdating(bool)", false);
  excel-&gt;dynamicCall("SetDisplayAlerts(bool)", false);

  QAxObject* workbooks = excel-&gt;querySubObject( "Workbooks" );
  workbooks-&gt;querySubObject( "Open(const QString&amp;)", filepath);

  QAxObject* workbook = excel-&gt;querySubObject("ActiveWorkBook");

  QAxObject* sheets = workbook-&gt;querySubObject( "Worksheets" );

QAxObject* sheet = sheets-&gt;querySubObject("Item(int)", count);

sheet-&gt;querySubObject("Cells(int,int)", 10, 16600)-&gt;setProperty("Value", QString("SomeData"));

</code></pre>
<p dir="auto">As soon is hit this last statement, the application crashes.</p>
<p dir="auto">Can someone please help me what I'm missing here ?</p>
<p dir="auto">Thanks :)</p>
]]></description><link>https://forum.qt.io/topic/114376/qaxobject-writing-cell-more-than-column-16600-crashing-application</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 00:41:21 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/114376.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 03 May 2020 13:44:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QAxObject writing cell more than column 16600 crashing application on Sun, 03 May 2020 13:49:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/npatil15">@<bdi>npatil15</bdi></a><br />
So <em>presumably</em> it's crashing because you don't test the result of <code>sheet-&gt;querySubObject("Cells(int,int)", 10, 16600)</code>, which maybe is returning <code>nullptr</code>?</p>
<p dir="auto">And if 16,600 is number of columns in your code (would help if you said), have you looked the limits of your Excel?  E.g. I can't vouch for it, but <a href="https://answers.microsoft.com/en-us/msoffice/forum/all/what-is-the-maximum-number-of-columns-in-a/5a053135-4865-e011-8dfc-68b599b31bf5" target="_blank" rel="noopener noreferrer nofollow ugc">https://answers.microsoft.com/en-us/msoffice/forum/all/what-is-the-maximum-number-of-columns-in-a/5a053135-4865-e011-8dfc-68b599b31bf5</a></p>
<blockquote>
<p dir="auto">in an Excel 2007-2010 format worksheet (in a .xlsx, .xlsm or .xlsb workbook) 16.384 columns (A ... XFD).</p>
</blockquote>
<p dir="auto">Quite why you want 16k columns I can't imagine....</p>
]]></description><link>https://forum.qt.io/post/592283</link><guid isPermaLink="true">https://forum.qt.io/post/592283</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 03 May 2020 13:49:24 GMT</pubDate></item><item><title><![CDATA[Reply to QAxObject writing cell more than column 16600 crashing application on Sun, 03 May 2020 14:22:20 GMT]]></title><description><![CDATA[<p dir="auto">You were right, I'm accessing large range for coloum which is somewhere wrong because of my uninitialized variable mistakenly.</p>
<p dir="auto">But thank you so much, I was unaware of this key knowledge of excel max limits.</p>
<p dir="auto">Thanks :)</p>
]]></description><link>https://forum.qt.io/post/592289</link><guid isPermaLink="true">https://forum.qt.io/post/592289</guid><dc:creator><![CDATA[npatil15]]></dc:creator><pubDate>Sun, 03 May 2020 14:22:20 GMT</pubDate></item><item><title><![CDATA[Reply to QAxObject writing cell more than column 16600 crashing application on Sun, 03 May 2020 13:49:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/npatil15">@<bdi>npatil15</bdi></a><br />
So <em>presumably</em> it's crashing because you don't test the result of <code>sheet-&gt;querySubObject("Cells(int,int)", 10, 16600)</code>, which maybe is returning <code>nullptr</code>?</p>
<p dir="auto">And if 16,600 is number of columns in your code (would help if you said), have you looked the limits of your Excel?  E.g. I can't vouch for it, but <a href="https://answers.microsoft.com/en-us/msoffice/forum/all/what-is-the-maximum-number-of-columns-in-a/5a053135-4865-e011-8dfc-68b599b31bf5" target="_blank" rel="noopener noreferrer nofollow ugc">https://answers.microsoft.com/en-us/msoffice/forum/all/what-is-the-maximum-number-of-columns-in-a/5a053135-4865-e011-8dfc-68b599b31bf5</a></p>
<blockquote>
<p dir="auto">in an Excel 2007-2010 format worksheet (in a .xlsx, .xlsm or .xlsb workbook) 16.384 columns (A ... XFD).</p>
</blockquote>
<p dir="auto">Quite why you want 16k columns I can't imagine....</p>
]]></description><link>https://forum.qt.io/post/592283</link><guid isPermaLink="true">https://forum.qt.io/post/592283</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 03 May 2020 13:49:24 GMT</pubDate></item></channel></rss>