<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Export to Excel macro (no field grouping) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494629#M693202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For me the macro didn't truncates after 255 chars - it worked (Excel 2003). I believe it is rather an excel issue as from qv. You could try before you the data pasted, the column to formated as text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way could be the pivot to read and write the data on cell level - see APIGuide.qvw for suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject( "CH01" )&lt;/P&gt;&lt;P&gt;for RowIter = 0 to table.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter =0 to table.GetColumnCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cell = table.GetCell(RowIter,ColIter)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(cell.Text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jul 2013 12:46:44 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2013-07-19T12:46:44Z</dc:date>
    <item>
      <title>Export to Excel macro (no field grouping)</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494627#M693200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing another problem now. As build in "Export to Excel" functionality truncates field data after 255 chars I am forced to use macro to export to excel.&lt;/P&gt;&lt;P&gt;(second thing is after - export formatting I must do)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I already found a nice and easy macro which export to Excel without truncate and which allows me any additional editing I want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13741359854791121" jivemacro_uid="_13741359854791121"&gt;&lt;P&gt;sub Excel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set XLApp = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLapp.Visible = true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set XLDOC = XLApp.Workbooks.Add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLDoc.Sheets(1).name = "Export"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set XLSheet = XLDoc.Worksheets(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set myTable = ActiveDocument.GetSheetObject("CH01")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set XLSheet = XLDoc.Worksheets(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mytable.CopyTableToClipboard true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLSheet.Paste XLSheet.Range("A1")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLSheet.Columns("C").ColumnWidth=40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLSheet.Cells.Entirerow.AutoFit&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt;. First row of my pivot table is grouped, and I do not want it to be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically can't find a win win solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Build in funcitonality exports my table not grouped, but truncates text and does not allow to any formatting:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="44188" alt="buildin.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/44188_buildin.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My macro exports un-trancated and allows additional formattiong but leaves 1 column grouped:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="44194" alt="macro.png" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/44194_macro.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I change macro to make column 1 look like from build-in export?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PS. I am attaching my sampe qvw.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Kuba&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 08:26:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494627#M693200</guid>
      <dc:creator />
      <dc:date>2013-07-18T08:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel macro (no field grouping)</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494628#M693201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Noone knows solution for this? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 09:15:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494628#M693201</guid>
      <dc:creator />
      <dc:date>2013-07-19T09:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel macro (no field grouping)</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494629#M693202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For me the macro didn't truncates after 255 chars - it worked (Excel 2003). I believe it is rather an excel issue as from qv. You could try before you the data pasted, the column to formated as text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way could be the pivot to read and write the data on cell level - see APIGuide.qvw for suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject( "CH01" )&lt;/P&gt;&lt;P&gt;for RowIter = 0 to table.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter =0 to table.GetColumnCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cell = table.GetCell(RowIter,ColIter)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(cell.Text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 12:46:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494629#M693202</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2013-07-19T12:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel macro (no field grouping)</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494630#M693203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for suggestion. I am working with QV9 (and Excel 2007) which might be a problem...&lt;/P&gt;&lt;P&gt;i will definitely take your tip into consideration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Kuba&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 12:56:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494630#M693203</guid>
      <dc:creator />
      <dc:date>2013-07-19T12:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel macro (no field grouping)</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494631#M693204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you could use a workaround by creating a copy of your Pivot Table object as a hidden Straight Table object. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way, once your users are visually satisfied with the result set displayed in the Pivot Table from selections they have chosen, they can call the macro through the means you have provided them, which will export the same data, but from the hidden straight table instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps, regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 13:09:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494631#M693204</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-07-19T13:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel macro (no field grouping)</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494632#M693205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is an awesome idea &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; Thank you so much! It is sometimes so hard to spot simpliest solution..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 07:06:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-macro-no-field-grouping/m-p/494632#M693205</guid>
      <dc:creator />
      <dc:date>2013-07-22T07:06:42Z</dc:date>
    </item>
  </channel>
</rss>

