Spaltennummer in Excelnamen A-Z und AA bis ZZ berechnen
Ich brauchte eine kleine Funktion mit der man eine Spaltennummer in ein Excel spezifische Bezeichner umwandelt. Excel Nummeriert die Spalten von A-Z, bez. danach mit AA, AB usw.
Das PHP Script kann einen Numerischen Spalte von A bis ZZ, d.h. 1 bis 702 umwandeln.
Das PHP Script kann einen Numerischen Spalte von A bis ZZ, d.h. 1 bis 702 umwandeln.
function Spalte($zahl) { $buchstaben= array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"); $division = $zahl / 26; $divisionrest = $zahl % 26; if ($zahl < 26){ $excel_spalte = $buchstaben[$divisionrest-1]; } elseif ($zahl == 26){ $excel_spalte = "Z"; } elseif ($divisionrest == 0){ $excel_spalte = $buchstaben[$division-2]; $excel_spalte .= "Z"; } else { $excel_spalte = $buchstaben[$division-1]."".$buchstaben[$divisionrest-1]; } return $excel_spalte; }
×
...auch noch interessant
- Tipps und Tricks // 09.02.2024MySQL: Japanisch konvertieren zwischen HEX, Decimal code point, UNICODE characters bytes
- Tipps zur Programmierung // 20.05.2021Tippspiel: Fussball Euro 2020
- Tipps und Tricks // 12.03.2019Tipp für die Linux Bash: jq is a lightweight and flexible command-line JSON processor
- Tipps zur Programmierung // 30.12.2018Synolgoy: Docker: Gitea - Git with a cup of tea
Tippsammlung
Kleine Tippsammlung für mich und dijenige die sich auf meine Webseite verirrt haben.Archiv
Jahr
Tag(s):- Feb 2024 (3)
- Jan 2024 (1)
- Sep 2023 (1)
- Jul 2023 (1)
- Apr 2023 (1)
- Feb 2023 (1)
- Nov 2022 (2)
- Oct 2022 (1)
- Jul 2022 (1)
- Jun 2022 (2)
- May 2022 (2)
- Apr 2022 (6)
- tipps (31)
- synology (27)
- linux (22)
- Windows (19)
- tool (17)
- Powershell (15)
- Windows 10 (13)
- csharp (c#) (9)
- coding (9)
- security (6)
- ad (6)
- Windows 2012 R2 (5)
- vpn (5)
- Ubuntu (5)
- Pi (5)
- gitea (5)
- git (5)
- Windows 2012 (4)
- opnsense (4)
- openpgp.js (4)
- mysql (4)
- docker (4)
- Xubuntu (3)
- Windows 2016 (3)
- Ubuntu 22.04 (3)
- seo (3)
- Japanisch (3)
- ipkg (3)
- app (3)
- Android (3)
- Zertifizierungsstelle (2)
- wsus (2)
- Windows Updates (2)
- windows 2022 (2)
- Windows 2008 (2)
- web2 (2)
- wadoku (2)
- VMware (2)
- verschlüsselung (2)
- Scripts (2)
- php (2)
- pgp (2)
- perl (2)
- openvpn (2)
- LMS (2)
- Kanji (2)
- javascript (2)
- GnuPgP (2)
- Firewall (2)
- Excel (2)
Nichts gefunden
Es wurde zur Story Spaltennummer in Excelnamen A-Z und AA bis ZZ berechnen kein Kommentar gefundenInformation
Werbung oder Ähnliches sind nicht erlaubt, daher wird jeder Beitrag geprüft und freigegeben.Advertising, etc. are not allowed, so any contribution is reviewed and approved.
Facebook-Webadress are not allowed, Facebook als Webadresse ist nicht erlaubt
* Die E-Mail wird nicht veröffentlicht / The email will not be published
** Bitte Zahl eintragen / Please enter the number
Modal Header
Some text in the Modal Body
Some other text...
(c)2024 stastka.ch // help system