Git Product home page Git Product logo

Comments (3)

scriptingstudio avatar scriptingstudio commented on May 27, 2024 2
1..60 | Get-ExcelColumnName
ColumnNumber ColumnName
------------ ----------
           1 A
           2 B
           3 C
           4 D
           5 E
           6 F
           7 G
           8 H
           9 I
          10 J
          11 K
          12 L
          13 M
          14 N
          15 O
          16 P
          17 Q
          18 R
          19 S
          20 T
          21 U
          22 V
          23 W
          24 X
          25 Y
          26 Z
          27 AA
          28 AB
          29 AC
          30 AD
          31 AE
          32 AF
          33 AG
          34 AH
          35 AI
          36 AJ
          37 AK
          38 AL
          39 AM
          40 AN
          41 AO        
          42 AP
          43 AQ
          44 AR
          45 AS
          46 AT
          47 AU
          48 AV
          49 AW
          50 AX
          51 AY
          52 AZ
          53 BA
          54 BB
          55 BC
          56 BD
          57 BE        
          58 BF
          59 BG
          60 BH

from importexcel.

evild3ad avatar evild3ad commented on May 27, 2024

I created a hash table:

# ImportExcel
$global:EndColumn = [ordered]@{
1 = "A" 2 = "B" 3 = "C" 4 = "D" 5 = "E" 6 = "F" 7 = "G" 8 = "H" 9 = "I" 10 = "J" 11 = "K" 12 = "L" 13 = "M" 14 = "N" 15 = "O" 16 = "P" 17 = "Q" 18 = "R" 19 = "S" 20 = "T" 21 = "U" 22 = "V" 23 = "W" 24 = "X" 25 = "Y" 26 = "Z" 27 = "AA" 28 = "AB" 29 = "AC" 30 = "AD" 31 = "AE" 32 = "AF" 33 = "AG" 34 = "AH" 35 = "AI" 36 = "AJ" 37 = "AK" 38 = "AL" 39 = "AM" 40 = "AN" 41 = "AO" 42 = "AP" 43 = "AQ" 44 = "AR" 45 = "AS" 46 = "AT" 47 = "AU" 48 = "AV" 49 = "AW" 50 = "AX" 51 = "AY" 52 = "AZ" 53 = "BA" 54 = "BB" 55 = "BC" 56 = "BD" 57 = "BE" 58 = "BF" 59 = "BG" 60 = "BH"
}

$Count = $WorkSheet.Dimension.End.Column
Set-Format -Address $WorkSheet.Cells["A1:$($EndColumn.$Count)1"] -BackgroundColor $BackgroundColor -FontColor Black

Works for me, but I don't know if there is an easier way.

from importexcel.

evild3ad avatar evild3ad commented on May 27, 2024

Thank you!

from importexcel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.