Jump to content
maniootek

Format range as table in Excel

Recommended Posts

Posted (edited)

Is it possible to format cell range as table with some build in method/function in Excel?

Excel 2013: Tables

Edited by maniootek

Share this post


Link to post
Share on other sites

Just record a macro performing the tasks and then convert the vb as Nine suggested, for example:

#include <Excel.au3>

Global Const $xlSrcRange = 1
$oExcel = _Excel_Open()
$oWorkbook = _Excel_BookNew($oExcel)
$oWorkbook.ActiveSheet.ListObjects.Add($xlSrcRange, $oWorkbook.ActiveSheet.Range("$A$1:$H$3"),"",$xlYes).Name = "Table1"
$oRange = $oWorkbook.ActiveSheet.Range("Table1[#All]").Select
$oWorkbook.ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleLight3"

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...