<?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: Excel Export Border in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226150#M78384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniela&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been looking for something similar but the code you've written does not seem to work, if it worked for you, please share a sample .qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pratyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Feb 2017 10:37:27 GMT</pubDate>
    <dc:creator>prat1507</dc:creator>
    <dc:date>2017-02-22T10:37:27Z</dc:date>
    <item>
      <title>Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226142#M78376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;does anyone know how I can set the borderstyle and color of an range?&lt;/P&gt;&lt;P&gt;Excel Macro Recorder returned this:&lt;/P&gt;&lt;P&gt;Range("A1:O22").Select&lt;BR /&gt; Selection.Borders(xlDiagonalDown).LineStyle = xlNone&lt;BR /&gt; Selection.Borders(xlDiagonalUp).LineStyle = xlNone&lt;BR /&gt; With Selection.Borders(xlEdgeLeft)&lt;BR /&gt; .LineStyle = xlContinuous&lt;BR /&gt; .ColorIndex = 0&lt;BR /&gt; .TintAndShade = 0&lt;BR /&gt; .Weight = xlThin&lt;BR /&gt; End With&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; With Selection.Borders(xlEdgeTop)&lt;BR /&gt; .LineStyle = xlContinuous&lt;BR /&gt; .ColorIndex = 0&lt;BR /&gt; .TintAndShade = 0&lt;BR /&gt; .Weight = xlThin&lt;BR /&gt; End With&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; With Selection.Borders(xlEdgeBottom)&lt;BR /&gt; .LineStyle = xlContinuous&lt;BR /&gt; .ColorIndex = 0&lt;BR /&gt; .TintAndShade = 0&lt;BR /&gt; .Weight = xlThin&lt;BR /&gt; End With&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; With Selection.Borders(xlEdgeRight)&lt;BR /&gt; .LineStyle = xlContinuous&lt;BR /&gt; .ColorIndex = 0&lt;BR /&gt; .TintAndShade = 0&lt;BR /&gt; .Weight = xlThin&lt;BR /&gt; End With&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; With Selection.Borders(xlInsideVertical)&lt;BR /&gt; .LineStyle = xlContinuous&lt;BR /&gt; .ColorIndex = 0&lt;BR /&gt; .TintAndShade = 0&lt;BR /&gt; .Weight = xlThin&lt;BR /&gt; End With&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; With Selection.Borders(xlInsideHorizontal)&lt;BR /&gt; .LineStyle = xlContinuous&lt;BR /&gt; .ColorIndex = 0&lt;BR /&gt; .TintAndShade = 0&lt;BR /&gt; .Weight = xlThin&lt;BR /&gt; End With&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this I get a selection is required error.&lt;/P&gt;&lt;P&gt;I also tried this:&lt;/P&gt;&lt;P&gt;With xlSheet&lt;BR /&gt; .Cells.Borders.LineStyle = 1&lt;BR /&gt; .PageSetup.Orientation = 2&lt;BR /&gt; .AutoFilterMode = False&lt;BR /&gt;End With&lt;/P&gt;&lt;P&gt;-&amp;gt; looks good so far but makes border around all cells &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another problem I have is that sometimes a second excel document .&lt;/P&gt;&lt;P&gt;This file has no filename (e.g. sheet1) and . Seems as somehting is cached?&lt;/P&gt;&lt;P&gt;does somebody know what's the reason for this?&lt;/P&gt;&lt;P&gt;My Macro looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function ExcelCopy(path)&lt;BR /&gt;&lt;BR /&gt;set XLApp = CreateObject("Excel.Application")&lt;BR /&gt;XLApp.Visible = False&lt;BR /&gt;set XLDoc = XLApp.Workbooks.Add&lt;BR /&gt;set XLSheet = XLDoc.Worksheets(1)&lt;BR /&gt;&lt;BR /&gt;XLSheet.Range("A1").select&lt;BR /&gt;&lt;BR /&gt;'Copy First Table and paste it to xcel sheet&lt;BR /&gt;set obj = ActiveDocument.getsheetobject("CH25")&lt;BR /&gt;objname = obj.getCaption.name.v&lt;BR /&gt;obj.CopyTableToClipboard true&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;XLSheet.paste&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;XLSheet.cells.select&lt;BR /&gt;&lt;BR /&gt;'Resize Excel Rows and Columns&lt;BR /&gt;XLSheet.Cells.EntireColumn.AutoFit&lt;BR /&gt;XLSheet.Cells.EntireRow.AutoFit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;'Set Header Row height&lt;BR /&gt;XLSheet.Rows("1:1").RowHeight = 25.5&lt;BR /&gt;&lt;BR /&gt;'add Autofilter&lt;BR /&gt;&lt;BR /&gt;XLSheet.Range("A1").AutoFilter&lt;BR /&gt;&lt;BR /&gt;'set to print landscape&lt;BR /&gt;&lt;BR /&gt;'With XLSheet.PageSetup&lt;BR /&gt;'.Orientation = 2 'xlLandscape&lt;BR /&gt;'.FitToPagesWide = 1&lt;BR /&gt;'.FitToPagesTall = False&lt;BR /&gt;'.PaperSize = 9 ' xlApp.xlPaperA4&lt;BR /&gt;&lt;BR /&gt;With xlSheet&lt;BR /&gt; .Cells.Borders.LineStyle = 1&lt;BR /&gt; .PageSetup.Orientation = 2&lt;BR /&gt; .AutoFilterMode = False&lt;BR /&gt;End With&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;'XLSheet.Rows("2:2").Select&lt;BR /&gt;'XLApp.ActiveWindow.FreezePanes = True&lt;BR /&gt;&lt;BR /&gt;'XLSheet.Range("E2").Select&lt;BR /&gt;'XLApp.ActiveWindow.FreezePanes = True&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;XLDoc.SaveAs path&lt;BR /&gt;XLApp.Quit&lt;BR /&gt;End function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Aloah&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 19:47:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226142#M78376</guid>
      <dc:creator />
      <dc:date>2009-10-27T19:47:50Z</dc:date>
    </item>
    <item>
      <title>Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226143#M78377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a little confused as to what you're trying to do and what is happening.&lt;/P&gt;&lt;P&gt;You seem to have a solid setup there in your macro. I don't see anything obvious.&lt;/P&gt;&lt;P&gt;You mention all cells getting borders and using Cells will apply to all cells.. Are you trying to get borders around only certain cells?&lt;/P&gt;&lt;P&gt;You also mention a selection required error. I usually select the cells I want to edit:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;.Cells.Select&lt;BR /&gt;.Selection.Borders(10).LineStyle = 1&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;That would give every cell a right border. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;To make a specific selection:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;.Range("A1").Select&lt;BR /&gt;.Selection.Borders(10).LineStyle = 1&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;This would give only A1 a right border. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Also, the problem you describe where you're getting an extra sheet sounds like what happens when the macro crashed in the middle of the process and can't close out the file correctly. Sometimes, I'll see another document or have problems opening or deleting the Excel document.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 21:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226143#M78377</guid>
      <dc:creator />
      <dc:date>2009-10-27T21:26:50Z</dc:date>
    </item>
    <item>
      <title>Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226144#M78378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your help.&lt;BR /&gt;I tried with:&lt;/P&gt;&lt;P&gt;With xlSheet&lt;BR /&gt;.Range("A1").Select&lt;BR /&gt;.Selection.Borders(10).LineStyle = 1&lt;BR /&gt;End With&lt;/P&gt;&lt;P&gt;I'm getting an error: &lt;EM&gt;Object&lt;/EM&gt; dosen't &lt;EM&gt;support&lt;/EM&gt; this property or &lt;EM&gt;method: 'Selection''&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sorry I' quite new to macros.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 16:05:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226144#M78378</guid>
      <dc:creator />
      <dc:date>2009-10-28T16:05:26Z</dc:date>
    </item>
    <item>
      <title>Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226145#M78379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ciao!&lt;/P&gt;&lt;DIV dir="ltr" id="result_box"&gt;Begins by declaring these constants&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;'*********************************************&lt;BR /&gt;' Constants for the Document.&lt;BR /&gt; '*********************************************&lt;BR /&gt;'&lt;BR /&gt;' For EXCEL&lt;BR /&gt;'&lt;BR /&gt;Const xlContinuous = 1&lt;BR /&gt;Const xlDiagonalDown = 5&lt;BR /&gt; Const xlDiagonalUp = 6&lt;BR /&gt;Const xlEdgeLeft = 7&lt;BR /&gt;Const xlEdgeTop = 8&lt;BR /&gt;Const xlEdgeBottom = 9&lt;BR /&gt;Const xlEdgeRight = 10&lt;BR /&gt;Const xlInsideVertical = 11&lt;BR /&gt;Const xlInsideHorizontal = 12&lt;BR /&gt;Const xlHairLine = 1&lt;BR /&gt;Const xlSolid = 1&lt;BR /&gt;Const xlThin = 2&lt;BR /&gt;Const xlAutomatic = -4105&lt;BR /&gt;Const xlCenter = -4108&lt;BR /&gt;Const xlNone = -4142&lt;BR /&gt;Const xlDown = -4121&lt;BR /&gt;Const xlUp = -4162&lt;BR /&gt;Const xlMedium = -4138&lt;BR /&gt;Const xlLeft = -4131&lt;BR /&gt;Const xlRight = -4152&lt;BR /&gt;Const xlToLeft = -4159&lt;BR /&gt;Const xlToRight = -4161&lt;BR /&gt;Const xlShiftToLeft = -4159&lt;BR /&gt;Const xTop = -4160&lt;BR /&gt;Const xlLastCell = 11&lt;BR /&gt;Const xlAscending = 1&lt;BR /&gt;Const xlGuess = 0&lt;BR /&gt;Const xlTopToBottom = 1&lt;BR /&gt;Const xlSortNormal = 0&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV dir="ltr" id="result_box"&gt;Now look what you can come in handy (excuse my English .... is that of Google) &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;Function BordiExcel(XLsheet, sRange, bVert, bOrr)&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlEdgeLeft).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlEdgeTop).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlEdgeBottom).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlEdgeRight).LineStyle = xlContinuous&lt;BR /&gt; if bVert ="S" then&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlInsideVertical).LineStyle = xlContinuous&lt;BR /&gt; end if&lt;BR /&gt; if bOrr ="S" then&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlInsideHorizontal).LineStyle = xlContinuous&lt;BR /&gt; end if&lt;BR /&gt;end Function&lt;/STRONG&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;XLSheet.Range("E1") = "DANIELA"&lt;BR /&gt; XLSheet.Range("E1").Font.Bold = True&lt;BR /&gt; XLsheet.Range("E1").Font.Size = 13&lt;BR /&gt; XLsheet.Range("E1:K1").MergeCells = True&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlInsideVertical).Weight = xlThin&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlInsideVertical).ColorIndex = xlAutomatic&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).WrapText = True&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).HorizontalAlignment = xlCenter&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).VerticalAlignment = xlCenter&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Interior.ColorIndex = 40&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;XLsheet.Cells.EntireColumn.AutoFit&lt;BR /&gt; XLsheet.Cells.EntireRow.AutoFit&lt;BR /&gt; XLsheet.name = vChi&lt;BR /&gt;&lt;BR /&gt; XLsheet.PageSetup.Orientation = 2 'Landscape&lt;BR /&gt; XLsheet.PageSetup.LeftMargin = xlApp.CentimetersToPoints(1)&lt;BR /&gt; XLsheet.PageSetup.RightMargin = xlApp.CentimetersToPoints(1)&lt;BR /&gt; XLsheet.PageSetup.HeaderMargin = xlApp.CentimetersToPoints(0.5)&lt;BR /&gt; XLsheet.PageSetup.TopMargin = xlApp.CentimetersToPoints(1.3)&lt;BR /&gt; XLsheet.PageSetup.BottomMargin = xlApp.CentimetersToPoints(1.3)&lt;BR /&gt; XLsheet.PageSetup.FooterMargin = xlApp.CentimetersToPoints(0.5)&lt;BR /&gt; XLsheet.PageSetup.PrintArea = "$A$1:$" &amp;amp;sLett&amp;amp;"$"&amp;amp;iRighe+2&lt;BR /&gt; XLsheet.PageSetup.PrintTitleRows = "$1:$5"&lt;BR /&gt; XLsheet.PageSetup.PrintTitleColumns = "$A:$" &amp;amp;sLett&lt;BR /&gt; XLsheet.PageSetup.CenterHeader = vSheetObj.GetCaption.Name.v&lt;BR /&gt; XLsheet.PageSetup.RightFooter = "Pag. &amp;amp;P di &amp;amp;N"&lt;BR /&gt; XLsheet.PageSetup.LeftFooter = "Generato il " &amp;amp; Date &amp;amp; " alle " &amp;amp; Time&lt;BR /&gt; XLsheet.PageSetup.LeftHeader = "&amp;amp;G"&lt;/STRONG&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;Ciao! Ciao!&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;Daniela&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 19:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226145#M78379</guid>
      <dc:creator />
      <dc:date>2009-10-28T19:55:23Z</dc:date>
    </item>
    <item>
      <title>Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226146#M78380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, sorry, it looks like QlikView does not like the Selections. Instead, you can just continue to use the range:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;With xlSheet.Range("A5").Borders(7)&lt;BR /&gt; .LineStyle = 1&lt;BR /&gt; .Weight = 2&lt;BR /&gt; .ColorIndex = -4105&lt;BR /&gt; End With&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Basically, instead of using .Range().Select and then .Selection, just use .Range()...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 19:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226146#M78380</guid>
      <dc:creator />
      <dc:date>2009-10-28T19:57:01Z</dc:date>
    </item>
    <item>
      <title>Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226147#M78381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV dir="ltr" id="result_box"&gt;Hello!&lt;BR /&gt;Begins with the state these constants!&lt;BR /&gt;(excuse my English ..... coming from google)&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;'*********************************************&lt;BR /&gt;' Constants for the Document.ShowPopup options.&lt;BR /&gt; '*********************************************&lt;BR /&gt;'&lt;BR /&gt;' For EXCEL&lt;BR /&gt;'&lt;BR /&gt;Const xlContinuous = 1&lt;BR /&gt;Const xlDiagonalDown = 5&lt;BR /&gt; Const xlDiagonalUp = 6&lt;BR /&gt;Const xlEdgeLeft = 7&lt;BR /&gt;Const xlEdgeTop = 8&lt;BR /&gt;Const xlEdgeBottom = 9&lt;BR /&gt;Const xlEdgeRight = 10&lt;BR /&gt;Const xlInsideVertical = 11&lt;BR /&gt;Const xlInsideHorizontal = 12&lt;BR /&gt;Const xlHairLine = 1&lt;BR /&gt;Const xlSolid = 1&lt;BR /&gt;Const xlThin = 2&lt;BR /&gt;Const xlAutomatic = -4105&lt;BR /&gt;Const xlCenter = -4108&lt;BR /&gt;Const xlNone = -4142&lt;BR /&gt;Const xlDown = -4121&lt;BR /&gt;Const xlUp = -4162&lt;BR /&gt;Const xlMedium = -4138&lt;BR /&gt;Const xlLeft = -4131&lt;BR /&gt;Const xlRight = -4152&lt;BR /&gt;Const xlToLeft = -4159&lt;BR /&gt;Const xlToRight = -4161&lt;BR /&gt;Const xlShiftToLeft = -4159&lt;BR /&gt;Const xTop = -4160&lt;BR /&gt;Const xlLastCell = 11&lt;BR /&gt;Const xlAscending = 1&lt;BR /&gt;Const xlGuess = 0&lt;BR /&gt;Const xlTopToBottom = 1&lt;BR /&gt;Const xlSortNormal = 0&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;Now look what you can come in handy (excuse my English .... is that of Google)&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;Function BordiExcel(XLsheet, sRange, bVert, bOrr)&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlEdgeLeft).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlEdgeTop).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlEdgeBottom).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlEdgeRight).LineStyle = xlContinuous&lt;BR /&gt; if bVert ="S" then&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlInsideVertical).LineStyle = xlContinuous&lt;BR /&gt; end if&lt;BR /&gt; if bOrr ="S" then&lt;BR /&gt; XLsheet.Range(sRange).Borders(xlInsideHorizontal).LineStyle = xlContinuous&lt;BR /&gt; end if&lt;BR /&gt;end Function&lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;XLSheet.Range("E1") = "DANIELA"&lt;BR /&gt; XLSheet.Range("E1").Font.Bold = True&lt;BR /&gt; XLsheet.Range("E1").Font.Size = 13&lt;BR /&gt; XLsheet.Range("E1:K1").MergeCells = True&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlInsideVertical).Weight = xlThin&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlInsideVertical).ColorIndex = xlAutomatic&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).WrapText = True&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).HorizontalAlignment = xlCenter&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).VerticalAlignment = xlCenter&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Interior.ColorIndex = 40&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;XLsheet.Cells.EntireColumn.AutoFit&lt;BR /&gt; XLsheet.Cells.EntireRow.AutoFit&lt;BR /&gt; XLsheet.name = vChi&lt;BR /&gt;&lt;BR /&gt; XLsheet.PageSetup.Orientation = 2 'Landscape&lt;BR /&gt; XLsheet.PageSetup.LeftMargin = xlApp.CentimetersToPoints(1)&lt;BR /&gt; XLsheet.PageSetup.RightMargin = xlApp.CentimetersToPoints(1)&lt;BR /&gt; XLsheet.PageSetup.HeaderMargin = xlApp.CentimetersToPoints(0.5)&lt;BR /&gt; XLsheet.PageSetup.TopMargin = xlApp.CentimetersToPoints(1.3)&lt;BR /&gt; XLsheet.PageSetup.BottomMargin = xlApp.CentimetersToPoints(1.3)&lt;BR /&gt; XLsheet.PageSetup.FooterMargin = xlApp.CentimetersToPoints(0.5)&lt;BR /&gt; XLsheet.PageSetup.PrintArea = "$A$1:$" &amp;amp;sLett&amp;amp;"$"&amp;amp;iRighe+2&lt;BR /&gt; XLsheet.PageSetup.PrintTitleRows = "$1:$5"&lt;BR /&gt; XLsheet.PageSetup.PrintTitleColumns = "$A:$" &amp;amp;sLett&lt;BR /&gt; XLsheet.PageSetup.CenterHeader = vSheetObj.GetCaption.Name.v&lt;BR /&gt; XLsheet.PageSetup.RightFooter = "Pag. &amp;amp;P di &amp;amp;N"&lt;BR /&gt; XLsheet.PageSetup.LeftFooter = "Generato il " &amp;amp; Date &amp;amp; " alle " &amp;amp; Time&lt;BR /&gt; XLsheet.PageSetup.LeftHeader = "&amp;amp;G"&lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;Ciao! Ciao!&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;Daniela&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 19:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226147#M78381</guid>
      <dc:creator />
      <dc:date>2009-10-28T19:58:50Z</dc:date>
    </item>
    <item>
      <title>Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226148#M78382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV dir="ltr"&gt;Hello!&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlInsideVertical).Weight = xlThin&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlInsideVertical).ColorIndex = xlAutomatic&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlEdgeLeft).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlEdgeLeft).Weight = xlMedium&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlEdgeTop).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlEdgeTop).Weight = xlMedium&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlEdgeBottom).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlEdgeBottom).Weight = xlMedium&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlEdgeRight).LineStyle = xlContinuous&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlEdgeRight).Weight = xlMedium&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Borders(xlInsideVertical).LineStyle = xlContinuous&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).WrapText = True&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).HorizontalAlignment = xlCenter&lt;BR /&gt; XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).VerticalAlignment = xlCenter&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;XLsheet.Range("A"&amp;amp;iRigheInt&amp;amp;":"&amp;amp;sLett&amp;amp;iRigheInt).Interior.ColorIndex = 40&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;Ciao!&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;STRONG&gt;Daniela&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 20:03:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226148#M78382</guid>
      <dc:creator />
      <dc:date>2009-10-28T20:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226149#M78383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you know the number of Cons xlDouble= ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 14:35:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226149#M78383</guid>
      <dc:creator />
      <dc:date>2014-07-15T14:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Export Border</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226150#M78384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniela&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been looking for something similar but the code you've written does not seem to work, if it worked for you, please share a sample .qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pratyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 10:37:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Export-Border/m-p/226150#M78384</guid>
      <dc:creator>prat1507</dc:creator>
      <dc:date>2017-02-22T10:37:27Z</dc:date>
    </item>
  </channel>
</rss>

