Via VBScript: I am reading a CSV file, applying various formats to columns, then writing it as an XLSX. I need to appy the "Green, TableStyle Medium 14" to it, but haven't been able to figure it out. I could only find one suggestion from google searching, but I cannot get it to work.
Ex.
Script setup:
Set fso = CreateObject("Scripting.FileSystemObject")
file = PathAndFileName.CSV
With CreateObject("Excel.Application")
Set WB = .Workbooks.Open(file)
Failed VBScript code:
WB.ActiveSheet.ListObjects.Add(xlSrcRange, Range(TableRange), , xlYes).Name = "myTable"
WB.ActiveSheet.ListObjects("myTable").TableStyle = "TableStyleMedium14"
Could someone please guide me to a solution?
Thanks....
Ex.
Script setup:
Set fso = CreateObject("Scripting.FileSystemObject")
file = PathAndFileName.CSV
With CreateObject("Excel.Application")
Set WB = .Workbooks.Open(file)
Failed VBScript code:
WB.ActiveSheet.ListObjects.Add(xlSrcRange, Range(TableRange), , xlYes).Name = "myTable"
WB.ActiveSheet.ListObjects("myTable").TableStyle = "TableStyleMedium14"
Could someone please guide me to a solution?
Thanks....